MCQOPTIONS
Saved Bookmarks
| 1. |
What will output when you compile and run the following code?#include struct student{_x005F_x000D_ int roll;int cgpa;int sgpa[8];_x005F_x000D_ };_x005F_x000D_ void main(){_x005F_x000D_ struct student s = { 12,8,7,2,5,9 };int *ptr;ptr = (int *)&s;clrscr();printf( "%d", *(ptr+3) );getch();_x005F_x000D_ } |
| A. | 8 |
| B. | 7 |
| C. | 2 |
| D. | Compiler error |
| Answer» D. Compiler error | |