Answer to Question #15183 in C++ for nin

Question #15183
What is the output of the following code?
char ch = 'G';
cout << tolower(ch) << endl;
Question 8 options:
A) the integer value of 'G'
B) G
C) g
D) the integer value of 'g'

I tried running it as this.
#include <iostream>
#include <fstream>
using namespace std;
int main()
{

char ch = 'G';
cout << tolower(ch) << endl;
system("pause");
}
1
Expert's answer
2012-09-25T11:10:12-0400
The correct answer is D) - the output of the following code is the integer value of 'g', i.e. 103. And remember, that function should return a value, so add &quot;return 0;&quot; to your main() function.

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS