C++ Chapter 2

Quiz
•
Computers
•
University
•
Hard

Albert Gorup
Used 11+ times
FREE Resource
7 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between the following two lines of code:
cout << "perimeter"; //LINE 1
cout << perimeter; //LINE 2
LINE 1 prints out the actual word perimeter and LINE 2 prints out the value held in the variable: perimeter.
LINE 2 prints out the actual word perimeter and LINE 1 prints out the value held in the variable: perimeter.
You do not need a semi-colon at the end of the two lines.
The lines are identical.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements will read in THREE values from standard input (user typing it in) into variables named num1, num2, and num3 .
cin>>num1>>num2>>num3;
cin>>num1>>num2>>num3>>endl;
cout<<num1<<num2<<num3<<endl;
cin>>number1>>number2>>number3;
3.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
(True or False) The following two snippets of code have the same result.
cin >> x >> y;
cin >> x;
cin >> y;
True
False
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an INVALID identifier?
1stplace
_firstplace
firstPlace
place1
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these data types requires the least amount of memory?
short
double
int
float
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To declare and initialize 3.14159 to a constant PI, which of the following is the correct syntax?
const PI = 3.14159;
const double 3.14159 = PI;
const double PI = 3.14159;
const int PI = 3.14159;
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
(T or F) The software development life cycle is a multi-stage process that includes the following items (in the following order):
* requirements specification
* system analysis
* system design
* implementation testing
* deployment
* maintenance
True
False
Similar Resources on Wayground
11 questions
Recap Chapter 6, 7, 8

Quiz
•
University
9 questions
control statments quiz

Quiz
•
University
10 questions
PHP

Quiz
•
University
11 questions
Programming I Quiz 1

Quiz
•
University
10 questions
asis kece

Quiz
•
University
10 questions
Ujian Tengah Semester Struktur Data

Quiz
•
University
12 questions
CSSE Quiz Day2

Quiz
•
University
6 questions
Luyện tập về NNLT

Quiz
•
University
Popular Resources on Wayground
15 questions
Hersheys' Travels Quiz (AM)

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
30 questions
Lufkin Road Middle School Student Handbook & Policies Assessment

Quiz
•
7th Grade
20 questions
Multiplication Facts

Quiz
•
3rd Grade
17 questions
MIXED Factoring Review

Quiz
•
KG - University
10 questions
Laws of Exponents

Quiz
•
9th Grade
10 questions
Characterization

Quiz
•
3rd - 7th Grade
10 questions
Multiply Fractions

Quiz
•
6th Grade