main()

{

char *cptr,c;

void *vptr,v;

c=10; v=0;

cptr=&c; vptr=&v;

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

}



main() { char *cptr,c; void *vptr,v; c=10; v=0; cptr=&c; vptr=&v; p..

Answer / susie

Answer :

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

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.

Is This Answer Correct ?    10 Yes 1 No

Post New Answer

More C Code Interview Questions

main( ) { static int a[ ] = {0,1,2,3,4}; int *p[ ] = {a,a+1,a+2,a+3,a+4}; int **ptr = p; ptr++; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); *ptr++; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); *++ptr; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); ++*ptr; printf(“\n %d %d %d”, ptr-p, *ptr-a, **ptr); }

2 Answers   Persistent,


main() { extern i; printf("%d\n",i); { int i=20; printf("%d\n",i); } }

1 Answers  


void main() { if(~0 == (unsigned int)-1) printf(“You can answer this if you know how values are represented in memory”); }

1 Answers  


main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitude"); }

2 Answers  


enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }

2 Answers  






main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }

1 Answers  


main() { signed int bit=512, i=5; for(;i;i--) { printf("%d\n", bit >> (i - (i -1))); } } a. 512, 256, 0, 0, 0 b. 256, 256, 0, 0, 0 c. 512, 512, 512, 512, 512 d. 256, 256, 256, 256, 256

2 Answers   HCL,


Program to Delete an element from a doubly linked list.

4 Answers   College School Exams Tests, Infosys,


Write a C program to add two numbers before the main function is called.

11 Answers   Infotech, TC,


#include<stdio.h> void fun(int); int main() { int a; a=3; fun(a); printf("\n"); return 0; } void fun(int i) { if(n>0) { fun(--n); printf("%d",n); fun(--n); } } the answer is 0 1 2 0..someone explain how the code is executed..?

1 Answers   Wipro,


Write a procedure to implement highlight as a blinking operation

2 Answers  


why nlogn is the lower limit of any sort algorithm?

0 Answers  


Categories