Online GK Series

This site is dedicated to the aspirants of competitive exams SSC, UPSC, Railways, Postal Assistants, Bank, GATE and NET

One Year MBA At Rs.7500/- Only Apply Now

Q.

What will be the output of the following code?

	struct abc{int a; int b;} v[3], *p;
	main()
	{
		p=v;
		p->a=3;
		p->b=p->a;
		printf("\n%d\t%d", v[0].a, v[0].b);
	}
	
A 3 4
B 4 3
C Any garbage value
D 3 3
Answer & Explanation
Option: [D]

mcq on c programming structures 03

Your Valuable Comments Please...

Useful Computer Science EBooks