Programming Languages C Objective
Mar 07, 2013

#include<stdio.h>

struct student

{

int roll;

int cgpa;

int sgpa[8];

};

void main()

{

struct student s={12,8,7,2,5,9};

int *ptr;

ptr=(int *)&s;

clrscr();

printf("%d",*(ptr+3));

getch();

}

What will output when you compile and run the above code?

Choose the correct answer:
A) 8
B) 2
C) Syntax error
D) Compiler error
Detailed Explanation

No Explanation

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback