Interview Question 3579

Created by admin on Sat, 17/11/2012 - 12:44
Explanation: 
You can create a variable of type void * but not of type void, since void is an empty type. In the second line you are creating variable vptr of type void * and v of type void hence an error.
Question: 

main() {
char *cptr,c;
void *vptr,v;
c=10;
v=0;
cptr=&c;
vptr=&v;
printf("%c%v",c,v);
}
 

Language: 
Answer: 

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