Write the output of the following:

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;

Options
- 1001 2001 3001
- 1001 2002 3004
- 1001 2001 3002
- 1001 2001 3004


CORRECT ANSWER : 1001 2002 3004

Discussion Board
Error

Compiler error:
the semicolon is missing at the line:
long *mylong //points to memory location 3000


Dario 11-3-2015 04:16 PM

ADBMS

thank you

workineh wogaso 04-26-2015 06:55 PM

2 The same answers

answer a and answer b are identical.

dominh 08-25-2014 02:51 PM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement