Vidyalelo
C++ Programming · Q407

C++ miscellaneous

Programming · C++ Programming · question 407

Q407

What will be the output of the following C++ code? #include #include using namespace std; int main() float val = 5.5; any var(val); if(var.has_value()) cout<<"Var is not Empty "; else cout<<"Var is Empty "; return 0;

A.
Var is Empty
B.
Var is not Empty
Answer
C.
Error
D.
Segmentation fault

Answer: Option B

Solution

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