C++ Programming 3RD Quarter Test
C++ Programming 3RD Quarter Test
Department of Education
Region IV-A (CALABARZON)
Division of San Pablo City
CRECENCIA DRUSILA LOPEZ SENIOR HIGH SCHOOL
(San Pablo City Senior High School-Stand Alone)
DLMP Compound, Brgy. San Roque, San Pablo City
General Instruction:
A. Read the instructions in every test type.
B. Select the best answer to the following questions.
C. Write the correct answer on the space provided before each number.
D. No erasures.
II. CHOOSE FROM THE LIST BELOW THE CORRECT ANSWER FOR EACH OF
THE FOLLOWING
&& iostream Return 0 Double
++ C++ /n cin
break max \n String
Display the sum of 5 + 10, using two Create a variable called z, assign x + y to it, and
variables: x and y. display the result.
int x = 5;
= int y = 10;
; = x + y;
int y = 10;
cout << x + y; cout << ;
Fill in the missing parts to create three variables Use the correct keyword to get user input, stored in the
of the same type, using a comma-separated list: variable x:
int x;
x=5 y=6 cout << "Type a number: ";
z = 50; >> ;
cout << x + y + z;
Fill in the missing parts to print the sum of two Add the correct data type for the following variables:
numbers (which is put in by the user):
int x, y; myNum = 9;
int sum; myDoubleNum = 8.99;
cout << "Type a number: ";
myLetter = 'A';
>> ;
cout << "Type another number: "; myBool = false;