True/False - Faculty
COPPIN STATE UNIVERSITY
COSC 199.002: FALL 2005
TEST 1
True/False (1pt each): Indicate by "T" for true and "F" for false statements
1. True or False? All computer programs are algorithms. ___T ___________
2. True or False? In a computer, data is represented electronically by pulses of electricity. ______ T__
3. True or False? The compiler is a program that translates a high-level language program into machine code. _____T _______
4. True or False? Every C++ program must have a function named main. __ T ____
5. True or False? The C++ compiler considers the identifier CanOfWorms to be the same as the identifier canofworms. ____ F _
6. True or False? Some C++ reserved words can also be used as programmer-defined identifiers. ______F _
7. True or False? In C++, a block (compound statement) is not terminated by a semicolon. ______T ___
8. True or False? If a program compiles successfully, it is guaranteed to execute correctly. _____F ______
9. True or False? A literal string can continue onto more than one line, as long as it is enclosed in double quotes. _____ T _____
10. True or False? The statement
const char INITIAL = 'G';
is an example of an assignment statement. ______F ___
Multiple Choice (2pts each)
11. Which of the following statements about the C++ main function is false?
a. Every program must have a function named main.
b. Program execution begins with the first executable statement in the main function.
( c. The main function must call (invoke) at least one other function.
d. The word int in the function heading means that the main function returns an integer value (to the operating system).
12. Which is /or are not a valid identifier(s) in C++?
a. Hi_There b. top 40 c. &UpAnDdOwN d. _BlindMice e. CAPS
13. Which is /or are not valid identifier(s) in C++?
a. my-Name b. 9littles c. X123Y d. GoHome e. IdEnTiFiEr
14. Which of the following is a legal string assignment?
a. name = "Jones"; b. "name" = Jones;
c. name = 'D' + "Jones"; d. a and c above
15. Which assignment statement could be used to store the letter A into the char variable someChar?
a. someChar = "A"; b. someChar = 'A'; c. someChar = A;
d. a and c above e. a, b, and c above
16. In C++, the phrase "standard output device" usually refers to:
a. the display screen b. a floppy disk drive c. the keyboard
d. a CD-ROM drive e. none of the above
17. Which of the following statements prints Happy Birthday on first output line?
a. cout ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- operations maintenance manual o m manual template
- chapter 7 certificate of eligibility coe and entitlement
- answers to in class exercises in lectures 9 10 11
- 65 07 1 maine
- calling prewritten c functions example 2
- reference manual 43 national park service
- guideline study start up to siv and site activation
- true false faculty
- chapter 115
Related searches
- true premises false conclusion
- mental health true false pdf
- true or false solver
- true premises false conclusion example
- true or false excel formula
- true false on excel
- true false excel logic
- false premises true conclusion
- false premise and false conclusion
- true prophecy verses false prophecy
- how to print true or false python
- true false in python