Get Started
873

Q: Would the following program compile? main() {     int a = 10, *j;     void *k;     J = k = &a;     J++;     k++;    printf ("\n%u %u", j, k); }

  • उत्तर देखें
  • Workspace

Answer :
Explanation :

An error would be reported in the statement k++ since arithmetic on void pointers is not permitted unless the void pointer is appropriately typecasted.

सबसे विस्तृत एग्जाम तैयारी प्लेटफार्म

Examsbook Prep ऐप आज ही प्राप्त करें