[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

C Programming :: Structures, Unions, Enums - Discussion

Home > C Programming > Structures, Unions, Enums > MCQs Questions Discussion

14 / 43

What is the output of the following program ?

#include<stdio.h>
struct aaa{
struct aaa *prev;
int i;
struct aaa *next;
};
void main()
{
struct aaa abc,def,ghi,jkl;
int x=100;
abc.i=0;
abc.prev=&jkl;
abc.next=&def;
def.i=1;def.prev=&abc;
def.next=&ghi;
ghi.i=2;ghi.prev=&def;
ghi.next=&jkl; jkl.i=3;
jkl.prev=&ghi;
jkl.next=&abc;
x=abc.next->next->prev->next->i;
printf("%d",x);
}

A4

B3

CCompilation Error

D2

ENone of these

Answer: Option (Login/Signup)

Show Explanation

Asked In ::

Post Your Answer Here:     

No Discussion on this question yet!