Vidyalelo
C++ Programming · Q18

Variables and Data Types in C++

Programming · C++ Programming · question 18

Q18

Which of the following is a valid way to initialize a variable in C++?

A.
int x(5);
B.
x = 5;
C.
int x = 5;
Answer
D.
int x; x = 5;

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board