जॉइन Examsbookउत्तर :
Would the following program compile?
main()
{
int a = 10, *j;
void *k;
J = k = &a;
J++;
k++;
printf ("\n%u %u", j, k);
}5
प्र: Would the following program compile? main() { int a = 10, *j; void *k; J = k = &a; J++; k++; printf ("\n%u %u", j, k); }
- उत्तर देखेंउत्तर छिपाएं
- Workspace
उत्तर :
व्याख्या :
An error would be reported in the statement k++ since arithmetic on void pointers is not permitted unless the void pointer is appropriately typecasted.

