1. What are output by the following three output statements? [C ease]
char str1 [] = "ABC";
char str2 [] = "ABC ";
const char str3 [] = "ABC";
const char str4 [] = "ABC";
const char * str5 = "ABC ";
const char * str6 = "ABC";
cout cout cout
2. Which of the following conditions can B be implicitly converted to a for non-C ++ built-in types A and B? [C ++ medium]
answer:
A. Class B: Public {......} // The Public B inherits from a, which can be indirectly inherited
B. class B {operator A () ;}// B implements implicit conversion to a
C. class A {A (const B &) ;}// a constructor that implements the non-explicit parameter as B (other parameters with default values can be available)
D. A & operator = (const A &); // value assignment operation. Although it is not an authentic implicit type conversion operation, you can barely calculate it as a
3. Are there any problems with the usage of the two sizeof in the Code below? [C easy]
void uppercase (char STR []) // converts lowercase letters in STR into uppercase letters
{< br> for (size_t I = 0; I If ('A' <= STR [I] & STR [I] <= 'Z ')
STR [I]-= ('A'-'A');
}< br> char STR [] = "ABCDE ";
cout <"str:" uppercase (STR );
cout