Discuss about the variable declarations


Discuss the following:

Q: Which of the following variable declarations are correct? If a variable declaration is not correct give the reason(s) and provide the correct variable declaration.

n = 12; //Line 1
char letter = ; //Line 2
int one = 5, two; //Line 3
double x, y, z; //Line 4

Line 3 and 4 are correct but what is wrong with Line 1 and Line 2?

 

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Discuss about the variable declarations
Reference No:- TGS01937971

Now Priced at $20 (50% Discount)

Recommended (99%)

Rated (4.3/5)