Wednesday, February 15, 2012

What are LG and LGP in the following program ?

#include<stdio.h>
void main()
{
     typedef long LG,*LGP;
     extern LGP lptr;
}


Ans :  

Here, the first statement declares LG as a typedef for long and LGP as a pointer to a long. 
The second statement declares lptr of type LGP with storage class as extern.

No comments:

Post a Comment