What will be the output of following code if user input a-00762
This subjective question is related to the book/course vu cs504 Software Engineering - I. It can also be found in vu cs504 Mid Term Solved Past Paper No. 2.
Question 1: What will be the output of following code, if user input a number 123?
int input ;
cin >> oct >> input;
cout << hex << input ;
int input ;
cin >> oct >> input;
cout << hex << input ;
Answer:
Rational: it will take 123 as octal and print it in hex form which is 53.