Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
COLLEGE I
OF NFORMATION TECHNOLOGY AND ENGINEERING
Subject Code : CC 102
Subject Title : COMPUTER PROGRAMMING 1
Term : PRELIM
Semester : FIRST School Year: 2019-2020
I. Write your answer on the space provided beside the number in CAPITAL
LETTERS. Avoid erasures.
A. 5 6 C. 6 7
B. 6 5 D. none of the mentioned
14. A device than can perform computations and make logical decisions phenomenally
father than human beings can.
A. Computer C. CPU
B. System Unit d. Motherboard
21. This allows the program to access all the information contained in the header file.
A. #include <iostream> C. int main()
B. using namespace std; D. return 0;
26. A device than can perform computations and make logical decisions more faster than
humans.
A. Computer C. CPU
B. System Unit d. Motherboard
27. The software that contains the core components of the operating systems is called
_________.
a. Operating System C. Kernel
b. System Software D. Application Software
30. ________ is also known as the manufacturing section that performs calculation.
A. Memory Unit C. Control Unit
B. Arithmetic Logic Unit D. Central Processing Unit
II. Match column A with the correct answer on column B, write only the
letter of answer on the blank provided at the left side of the test paper.
Column A Column B
____1. Extension of C Language a. Fields
____2. A leading manufacturer of b. Android
processors
____3. Header File. C++ standard c. #include <iostream>
input/output library file
____4. Greatest success of the open d. C++
source movement
____5. Group of characters or bytes e. Memory Unit
____6. Also known as the warehouse f. Linux
section
____7. Smallest Data Item g. Bits
____8. It is based from Linux and Java h. Multicore processor
____9. A region where your code resides i. namespace
____10. The brain of the computer j. CPU
____11. The programs than run on a k. Windows
computer
____12. It denotes exit status of the l. Software
application
____13. Identified by Gordon Moore m. Intel
____14. Approximately one billion bytes n. iostream
____15. A volatile type of memory o. Gigabyte
____16. The information that the p. Hardware
computer has processed
____17. The only language a computer q. Machine Language
can understand
____18. Group of related records r. 0
____19. A multiple processor integrated in s. CPU
a single chip
____20. A semicolon (;) is known as t. Moore’s Law
u. Termination statement
v. Output
w. Terabyte
x. Terminal
y. File
z. IBM
# include <iostream>
________________ (1)
int main()
{
char ________;(2)
float num1, num2;
cout << "Enter operator either + or - or * or /: ";
cin >> operator;
(3) ________ "Enter two operands: ";
cin >> (4)______ >> (5)______;
(6)_____________
{
case '+':
cout << "The sum of the two number is " << (7)________;
break;
case '-':
cout << "The difference of the two number is " << num1-num2;
break;
case '*':
cout << "The product of the two number is " << num1*num2;
break;
case '/':
cout << "(8)_______________________________ " << num1/num2;
break;
__________(9)
// If the operator is other than +, -, * or /, error message is shown
cout << "Error! operator is not correct";
break;
}
__________;(10)
}
#include <iostream>
using namespace std;
(11)_________;
int gVar2 = 2;
int main() {
char ch('A');
cout << "Value of gVar1: " << gVar1 _______(12);
cout << "Value of gVar2: " << _____ (13)<< endl;
cout << "Character in ch: " << _____(14) << endl;
int sum, number = 3;
sum= (15)_______+5;
cout << "Value of sum: " << sum << endl;
return 0;
}
Output:
Oh what
A happy day!
Oh yes,
What a happy day!
a happy day!
Oh yes,
Output:
Input x:
Input y:
The sum is:
a happy day!
Oh yes,
Prepared by:
Jenyll T. Mabborang
Instructor
Checked by:
Approved by: