c++ - capitalizing characters, how toupper works? -
I have to use a character array and the characters must be placed in the array and they need to be capitalized and less case as needed. . I was looking at Tupper and his example, but I'm confused about how it works. Looking at the example given on Cplusplus.com I wrote
int main () {int i = 0; Char str [] = "This is an examination."; While (str [i]) {Toucher (toupper (str [i])); I ++; } For (int i = 0; i <+ 15; i ++) {cout & lt; & Lt; Str [i]; }}
And there are not two things about it. First of all, the program prints without the bottom coat, this is an exam. Is the screen printed on the screen? (Pushkar's usage has not been explained on the example) but my second and important question is why it does not print still on the bottom of the cout. This is an examination. Can not change the character in str []? Is there another way I should do this (keeping in mind I need to use character arrays)?
Yes, caller ()
for a standard output of a program Prints. This is the purpose of this, it is the source of uppercase output.
Prints the original code of cout
in the lower part of the program because you have never modified it. toupper ()
does not function - actually can not - modify its logic instead, it returns the upper part.
Comments
Post a Comment