Professional Documents
Culture Documents
Quezon, Bukidnon
TEST 1: MULTIPLE CHOICE: Read the item carefully and choose the best answer. Write your answer on the space
provided each number
_________8.) If you want to convert source file directives to source code program statements, what high level program
will you need to run?
a. Compiler b. Preprocessor c. Code Converter d. Debugger
_________9.) What do you call a programming tool which convert source program into machine instructions?
a. Compiler b. Preprocessor c. Linker d. Updater
_________10.) Connecting hardware-specific code to machine instructions and producing an executable file is the
responsibility of_______.
a. Compiler b. Preprocessor c. Coder d. Linker
_________11.) Type casting is used for manual data type conversion. Which of the following syntax below follows the
correct format?
a. static_cast<data type> value b. static_cast<expression> value c. static_cast<data type> parameter
_________12.) Which programming language capabilities have a special meaning and can not be used for any other
purpose?
a. keywords b. linkers c. syntax d. Compiler
_________13.) Which of the following programmer-defined identifiers holds exact assigned literals?
a. int num=’R’; b. int num=2.5; c. int num= -.5; d. int num = 10;
_________14.) If you want the computer perform operations on data such as adding, subtracting, dividing, multiplying,
and etc., Which C++ capabilities to be used?
a. keywords b. identifiers c. operators d. reference
_________15.) The characters (endl) mark the end of a statement, or separate items in a list such as comma and
semicolon are known as
a. punctuation b. programmer-defined identifiers c. expression d. reference
_________16.) double number1, number2, number3; Which of the statements below clearly explain the word double?
a. The word double specifies that the variables can hold single-precision floating point numbers
b. The word double specifies that the variables can hold decimal-precision floating point numbers
c. The word double specifies that the variables can hold double-precision floating point numbers
d. The word double specifies that the variables can hold long-precision floating point numbers
_________17.) What do you call a C++ standard object displays output on the screen with the use of stream insertion
operator?
a. cout b. cin c. double d. int
_________18.) The integer variables can hold whole numbers such as 12, 7, and -99. Which of the following declared
variables not holding integer values?
a. int a = 3; b. double b = 4.5; c. short c = 8; d. long d = 100;
_________19.) Which of the following operators would be the most appropriate operator to be used to determine the size
of a data type?
a. indexof b. sizeof c. valueof d. expressionof
_________20.) Which of the following C++ operators below applied for assigning values to the variables and identifiers?
a. + b. / c. >> d. =
_________21.) What is referred to a part of the program in which the variable can be accessed and a variable cannot be
used before it is defined?
a. scope b. Literal c. Integral d. parameter
_________22.) To get the remainder from the division operation, binary arithmetic operator shall be used. Which of the
following operators below will you need to use?
a. / b. % c. * d. +
_________23.) Comments are used to document parts of the program so that persons reading the source code of the
program will understand the program flow: Which of the following symbols bellow is for comments?
a. # b. // c. ‘ d. ^
_________24.) int a = 9; What is the meaning of 9 value?
a. String Literal b. Integer Literal c. Character Literal d. Bool
_________25.) Which of the following symbols below for the Multi-Line comments?
a. #* *# b. // // c. /* */ d. /( )/
_________26.) Which of the following coercions will convert automatically a certain operand to another data type?
a. Type Coercion b. Promotion Coercion c. Demotion Coercion
_________27.) Which applicable coercion type will convert to a higher type or values?
a. Type Coercion b. Promotion Coercion c. Demotion Coercion
_________28.) When type needed to be converted into lower type, which coercions will do the conversion?
a. Type Coercion b. Promotion Coercion c. Demotion Coercion
_________29.) Which of the following codes below is referred to as constant value?
a. const double TAX_RATE = 0.0675; b. double TAX_RATE = 0.0675; c. TAX_RATE = 0.0675;
Consider the average calculation of your first grading period. As if you do have 8 subjects such as Math,
Science, English, Filipino, Araling Panlipunan, Physical Education, TVE, and Values Education. Assuming that
you have grades already for each subject. Now, develop a C++ program that will accept grades input per
subject, compute and display the average.
2. Once you have entered the input above, then press ENTER KEY, it will generate the following:
*******************************************
Hi! JUAN DELA CRUZ OF RAMBUTAN
NOW PLEASE ENTER YOUR GRADES EACH SUBJECT
*********************************************
Press any key to continue
Write a program that prompts the user to enter a weight in pounds and height in inches and
display the BMI. Note that one pound is 0.45359237 kilograms and one inch is 0.0254
meters.
Note: your program must accept input from the user such as name, section, and grades of every subject.
God Bless!!
Prepared by: Joynilenge C. Lavador