main()

{

int a=10,*j;

void *k;

j=k=&a;

j++;

k++;

printf("\n %u %u ",j,k);

}



main() { int a=10,*j; void *k; j=k=&a; j++; k+..

Answer / susie

Answer :

Compiler error: Cannot increment a void pointer

Explanation:

Void pointers are generic pointers and they can be used only
when the type is not known and as an intermediate address
storage type. No pointer arithmetic can be done on it and
you cannot apply indirection operator (*) on void pointers.

Is This Answer Correct ?    22 Yes 2 No

Post New Answer

More C Code Interview Questions

Write a routine to implement the polymarker function

0 Answers   TCS,


Code for 1>"ascii to string" 2>"string to ascii"

1 Answers   Aricent, Global Logic,


What is the difference between proc means and proc tabulate ? explain with a simple example when you have to use means or tabulate?

1 Answers  


main() { while (strcmp(“some”,”some\0”)) printf(“Strings are not equal\n”); }

1 Answers  


Predict the Output: int main() { int *p=(int *)2000; scanf("%d",2000); printf("%d",*p); return 0; } if input is 20 ,what will be print

2 Answers  






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

1 Answers   Value Labs,


why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?

0 Answers  


main(int argc, char *argv[]) { (main && argc) ? main(argc-1, NULL) : return 0; } a. Runtime error. b. Compile error. Illegal syntax c. Gets into Infinite loop d. None of the above

4 Answers   HCL, LG,


void main() { int c; c=printf("Hello world"); printf("\n%d",c); }

2 Answers  


what is brs test reply me email me kashifabbas514@gmail.com

0 Answers  


main() { int i=10; i=!i>14; Printf ("i=%d",i); }

1 Answers  


#define f(g,g2) g##g2 main() { int var12=100; printf("%d",f(var,12)); }

3 Answers  


Categories