Computers C++ (2)

posted by .

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.

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. science C++ programing

    could you please help me with this program even with one part please: Adding two strings (Actually, the correct term is concatenate because unlike adding two number and getting a new result, we add a second string to the end of the …
  2. Computers help pls

    What is 9.9 + (11 % 8)? Write one line that creates a variable named Pickles that can hold an integer and assign it the value of ten.
  3. Programming Logic

    I need to create a program that has (at least) two variables, char and num. I need to use nested loops to print char, a character, in the form of the following pattern on as many lines and as many times as specified by num. For example, …
  4. Programming Logic

    I need to create a program that has (at least) two variables, char and num. I need to use nested loops to print char, a character, in the form of the following pattern on as many lines and as many times as specified by num. For example, …
  5. computer science

    The variable cp_arr has been declared as an array of 26 pointers to char. Allocate 26 character values, initialized to the letters 'A' through 'Z' and assign their pointers to the elements of cp_arr (in that order). int *arr1[26]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'}; …
  6. C code

    //INSTRUCTIONS //Your parser will read from input.txt //input.txt consists of a series inputs that you need to read. //each input is proceeded by a flag. //Each flag will be either I,C, or F. //I means int C means char F means float. …
  7. Statistics

    STATISTICS: I'm struggling with how to calculate the following problems: *Assume that X~N(3,1.5) For what value of X is Pr(x<K) = 50% *Assume that X~N(3,1.5) What value of X would be equal to a z-score of -2?
  8. MATH help

    Which of the following statements is true?
  9. Math (Please Help)

    Select the phrase that correctly completes the sentence. The value of the dependent variable is always ___________ the value of the independent variable. A. Greater than B. Dependent on C. Equal to D. Lesson than
  10. C++

    (4 points) Identify the errors in the following statements. int* p = &44; - i think the star is the error because pointers are supposed to be like *p?

More Similar Questions