Question
#include<stdio.h>
int main()
{
int a=10, *j;
void *k;
j=k=&a;
j++;
k++;
printf("%u %u\n", j, k);
return 0;
}
Will the program compile in Turbo C?
#include<stdio.h>
int main()
{
int a=10, *j;
void *k;
j=k=&a;
j++;
k++;
printf("%u %u\n", j, k);
return 0;
}
Answer: Option B
Was this answer helpful ?
Error in statement k++. We cannot perform arithmetic on void pointers.
The following error will be displayed while compiling above program in TurboC.
Was this answer helpful ?
More Questions on This Topic :
Question 8.
Are the expression *ptr++ and ++*ptr are s....
Submit Solution