Write the output of the following: | CPP MCQs

char *mychar; //points to memory location 1000
short *myshort; //points to memory location 2000
long *mylong //points to memory location 3000
mychar++;
++myshort;
mylong++;
cout << mychar << myshort << mylong;
A.     1001 2001 3001
B.     1001 2002 3004
C.     1001 2001 3002
D.     1001 2002 3004

Ans: B

0 comments:

Post a Comment

Blogger news