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

void main() { char ch; for(ch=0;ch<=127;ch++) printf(ā€œ%c %d \nā€œ, ch, ch); }

1 Answers  


int i; main(){ int t; for ( t=4;scanf("%d",&i)-t;printf("%d\n",i)) printf("%d--",t--); } // If the inputs are 0,1,2,3 find the o/p

2 Answers  


write a c program to print magic square of order n when n>3 and n is odd?

1 Answers   HCL,


What is the problem with the following code segment? while ((fgets(receiving array,50,file_ptr)) != EOF) ;

1 Answers  


source code for delete data in array for c

1 Answers   TCS,






void main() { char a[]="12345\0"; int i=strlen(a); printf("here in 3 %d\n",++i); }

3 Answers  


Finding a number multiplication of 8 with out using arithmetic operator

8 Answers   Eyeball, NetApp,


Extend the sutherland-hodgman clipping algorithm to clip three-dimensional planes against a regular paralleiepiped

1 Answers   IBM,


write a c program to Reverse a given string using string function and also without string function

1 Answers  


main() { char a[4]="HELLO"; printf("%s",a); }

3 Answers   CSC,


#define max 5 #define int arr1[max] main() { typedef char arr2[max]; arr1 list={0,1,2,3,4}; arr2 name="name"; printf("%d %s",list[0],name); }

1 Answers  


Sir... please give some important coding questions asked by product companies..

0 Answers  


Categories