Data Types MCQs

100 MCQs  (Page 5 of 10)

In C++11, what happens with int x{3.5};?
Compilation error (narrowing conversion)
x = 3
x = 4
A warning only, and x = 3
Which statement about C++'s auto keyword (C++11) is correct?
The type is deduced at compile time, and the variable stays statically typed
Its type can change when a new value is assigned
It means automatic storage only, with no type deduction
It makes the variable dynamically typed, like Python