Logo 
Search:

C Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C ProgrammingRSS Feeds

C programming practical question 77

  Shared By: Adah Miller    Date: Jan 24    Category: C Programming    Views: 76

Answer:

main()
{
char *p;
int *q;
long *r;
p=q=r=0;
p++;
q++;
r++;
printf("%p...%p...%p",p,q,r);
}


Answer:
0001...0002...0004


Explanation:
++ operator when applied to pointers increments address according to their corresponding data-types.

Share: 
 

Didn't find what you were looking for? Find more on C programming practical question 77 Or get search suggestion and latest updates.


Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: