Can two functions declare variables(non static) with the same name?
A. No
B. Yes
C. Yes, but not a very efficient way to write programs
D. No, it gives a runtime error
Answer: Option C
A. No
B. Yes
C. Yes, but not a very efficient way to write programs
D. No, it gives a runtime error
Answer: Option C
Which of the following is a valid variable name in C++?
A. myVariable
B. 123variable
C. variable&
D. float
What is the data type of the variable 'x' in the following declaration: double x = 3.14;?
A. int
B. double
C. float
D. char
Join The Discussion