Showing posts with label void *. Show all posts
Showing posts with label void *. Show all posts

Tuesday, 14 February 2012

Frequently Asked Questions in Technical Round at MNCs like TCS, WIPRO, INFOSYS,..etc – 9

Predict the output or error(s) for the following:


1)

main()

{

char *cptr,c;


void *vptr,v;


c=10;  v=0;


cptr=&c; vptr=&v;


printf("%c%v",c,v);


}

Answer:

Compiler error (at line number 4): size of v is Unknown.


Explanation: