In the following code , assume that the base address of the structure is 2424384 (in decimal form) , what will be the output of the program
Solution
2424384
2424384
2424388
2424392
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int main() | |
{ | |
struct employee {int age;float salary;}; | |
struct employee e1={40,3000}; | |
struct employee *pointer_to_e=&e1; | |
printf("%d\n%d\n%d\n%d",pointer_to_e,&(e1.age),&(e1.salary),(pointer_to_e)+1); | |
return 0; | |
} |
2424384
2424384
2424388
2424392
No comments:
Post a Comment