1. Engineering
  2. Computer Science
  3. cmpsc 101121ist 140 80 points 1 a char literal can...

Question: cmpsc 101121ist 140 80 points 1 a char literal can...

Question details

CMPSC 101/121/IST 140 80 Points 1. A char literal can either be enclosed in single or double quotes. T of F?(2 2. How do we insert a double quote into a string? (4) What is the result if the computer tries to calculate a value that is larger than the maximum integer allowed for a given integral type? (3) 3. 4. How do you write a C++ cast operation? (3) 5. What is wrong with each of the following statements? (2 each) a. cin << score; b. cin>> Enter data; c. getline(someString, cin): 6. Correct the following code segment: (4) ifstream inData; string name; cout << Enter the name of the file: ; cin >> name; inFile.open(name);
Why wont the following expression in the if statement result in a division-by-zer when someint has the value 0? (3) zero error 7. if (somelnt I 0)&& (S/somelnt >10) (2) & A while loop exits when its termination condition becomes true. T of F? 9. The following code segment is supposed to write out the odd numbers from 1 to 19 What does it actually output? Change the code so it works correctly. (4) number 1; while (number < 10) f number++ cout << number * 2-1<c. 10. A switch expression may be of type bool, char, int, or long, but not of type float or 11. A break statement is not allowed in a for loop, but a continue statement is. T or F? 12. Which type of looping statement would you choose for a problem in which the decision string. T or F? (2) to repeat a process depends on an event, and the event cannot occur until the process is executed at least once? (2) 13. What is output by the following code segment? (4) for (int outCount -1; outCount<2;outCount++) for (int incourt-3; İnCount > 0; inCount.) cout << outCount+inCount << endl;
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution