Welcome Guest | Sign in | Register
Operators - Discussion Page For Q.10656 | C Programming Questions and Answers | C Programming Free Online-Tests | LucentBlackBoard | LucentBlackBoard.com

Home > Java Programming > Operators > Questions and Answers

Q: What will the output of following C code?
main()
{
char *p;
int *q;
long *r;
p=q=r=0;
p++;
q++;
r++;
printf("%p...%p...%p",p,q,r);
}
A. 0004...0002...0001 B. 0001...0002...0004
C. 0002...0004...0008 D. 0001...0002...0006

Answer and Explanation

Answer:0001...0002...0004

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

Comment on this Question

Name:

Loading...




Partner Sites
LucentBlackBoard.com                  SoftLucent.com                  LucentJobs.com
All rights reserved © 2012-2015 SoftLucent.