[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

43 / 43

What is the output of this C code?

#include <stdio.h> 
typedef struct p *q; 
struct p
{
int x; char y; q ptr;
};
int main()
{
struct p p = {1, 2, &p};
printf("%d\n", p.ptr->ptr->x); 
return 0;
}

ACompile time error

BSegmentation fault

CUndefined behavior

D1

Answer: Option (Login/Signup)

Show Explanation

Asked In :: TCS TCS NQT

Post Your Answer Here:     

No Discussion on this question yet!