0% found this document useful (0 votes)
218 views6 pages

I. Understanding Variables. Determine Whether The Following Variable Names Are Acceptable or

The document is a midterm quiz for a computer fundamentals and programming course. It contains 3 sections that evaluate the student's understanding of variables, operators, and the structure of a C++ program. The first section contains 5 variable names and the student must identify which are acceptable. The second section contains expressions using operators that the student must evaluate. The third section identifies 10 parts of a sample C++ program and the student must match them to the correct term.

Uploaded by

FerrolinoLouie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
218 views6 pages

I. Understanding Variables. Determine Whether The Following Variable Names Are Acceptable or

The document is a midterm quiz for a computer fundamentals and programming course. It contains 3 sections that evaluate the student's understanding of variables, operators, and the structure of a C++ program. The first section contains 5 variable names and the student must identify which are acceptable. The second section contains expressions using operators that the student must evaluate. The third section identifies 10 parts of a sample C++ program and the student must match them to the correct term.

Uploaded by

FerrolinoLouie
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 6

Adamson University Computer Engineering Department

College of Engineering Computer Fundamentals and Programming

MIDTERM - Quiz No.


Name: Date: Score:

Schedule: Instructor:

GENERAL DIRECTIONS: NO ERASURES. ALL FINAL ANSWERS SHOULD BE WRITTEN USING A NON-
ERASABLE PEN.

I. Understanding Variables. Determine whether the following variable names are acceptable or
not. Write “A” for acceptable and “NA” for not acceptable.

a. percent
b. Five5_five5
c. double
d. _1990_tax
e. number1

II. Understanding Operators.


A. To what value does each of the following expressions evaluate? Show your complete
solution. Box your final answer.

a. ((1 + -2) * 50 % 9)

b. 50 + (2 * (-1*(10 + 4)))

c. (5 != 5)

d. 10 % 3 * 3 – (1 + 10)

e. (10 + 2 * 3 / 2 )

cpedept.yda
Adamson University Computer Engineering Department
College of Engineering Computer Fundamentals and Programming

B. If x = 4, y = 6 and z = 2, determine whether each of the following evaluates true or false.


Show your solution. Write “T” for true and “F” for false. Box your final answer.

a. (z ==1) || (z++ < x)

b. (5==z) || (y-x == 2)

c. !(x == 4)

d. x != (y – z)

e. !((2*y–x ==z)&&(y==x+z))

III. Understanding Structure of a C++ program. Identify the different parts of the given C++
program. Choose your answer from the given choices below. Write the letter of the correct answer
on the table provided.

CHOICES: A. Get Character Function B. Comment


C. C++ Input Statement D. Clear Screen Function
E. Return Statement F. Preprocessor Directives
G. Main Function H. Expression
I. Variable Declaration J. C++ Output Statement

(1)
// this solves the area of a circle
#include<iostream.h> (2) 1.
#include<conio.h> 2.
#include<math.h> 3.
int main( ) 4.
(3)
5.
{
(4) 6.
int a, b, sum, x; 7.
clrscr( ); (5) 8.
cout<<”Enter two numbers: ”; 9.
cin>>a >> b; (6) 10.
sum = a+b; (7)
(8)
cout<<”\nThe sum of” << x << “and” << y << “is” << sum;
getch( ); (9)
return 0; (10)
}

cpedept.yda
Adamson University Computer Engineering Department
College of Engineering Computer Fundamentals and Programming

cpedept.yda
Adamson University Computer Engineering Department
College of Engineering Computer Fundamentals and Programming

cpedept.yda
Adamson University Computer Engineering Department
College of Engineering Computer Fundamentals and Programming

cpedept.yda
Adamson University Computer Engineering Department
College of Engineering Computer Fundamentals and Programming

cpedept.yda

You might also like