Vidyalelo
C++ Programming · Q272

C++ miscellaneous

Programming · C++ Programming · question 272

Q272

What will be the output of the following C++ code? #include #include #include using namespace std; void MyFunc(char c) if (c ::max()) return invalid_argument; int main() try MyFunc(256); catch(invalid_argument& e) cerr << e.what() << endl; return -1; return 0;

A.
256
B.
Invalid argument
C.
Error
Answer
D.
246

Answer: Option C

Solution

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