Post a New Question

Computers C++ (2)

posted by on .

1.) Assume c is a char variable. What value does c hold after the following statement executes? (Type the answer without quotes.)

c = toupper('a');___________

2.) Assume c is a char variable. What value does c hold after the following statement executes? (Type the answer without quotes.)

c = toupper('B');___________

3.) Assume c is a char variable. What value does c hold after the following statement executes? (Type the answer without quotes.)

c = tolower('7');___________

  • Computers C++ (2) - ,

    Have you actually read the description of toupper?

    Converts c to its uppercase equivalent if c is a lowercase letter and has an uppercase equivalent. If no such conversion is possible, the value returned is c unchanged.

    So, what do you think are the correct answers?

  • Computers C++ (2) - ,

    Thanks Steve! Is that I don't have a book, can't afford it too expensive.
    You made it clear...
    A, b, 7

  • Computers C++ (2) - ,

    toupper('B')
    is B a lower-case letter with an upper-case equivalent?
    No. So, B is left unchanged. The answers are:

    A,B,7

  • Computers C++ (2) - ,

    Ok... Thanks!

  • Computers C++ (2) - ,

    You obviously have a computer. Just do a web search for "c++ toupper" and you can find documentation online.

    If you are studying C++, you must surely have some kind of course materials.

    These days there is a huge wealth of documentation online. Make us of it and life will be easier.

Answer This Question

First Name:
School Subject:
Answer:

Related Questions

More Related Questions

Post a New Question