0% found this document useful (0 votes)
16 views3 pages

Eng 214 C Question Suggestions by Uchechi

This document contains sample questions for a C++ exam, covering topics like compilers, programs, functions, input/output operations, file extensions, escape sequences, comments, data types, constants, and variable declaration. It also provides a debugging exercise and a coding exercise to write a program displaying personal information, calculating values from a registration number, and applying Ohm's law.

Uploaded by

dialauchenna
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)
16 views3 pages

Eng 214 C Question Suggestions by Uchechi

This document contains sample questions for a C++ exam, covering topics like compilers, programs, functions, input/output operations, file extensions, escape sequences, comments, data types, constants, and variable declaration. It also provides a debugging exercise and a coding exercise to write a program displaying personal information, calculating values from a registration number, and applying Ohm's law.

Uploaded by

dialauchenna
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/ 3

ENG 214 QUESTIONS (FOR C++ LANGUAGE)

PREPARED BY IWUCHUKWU, U.C.


SECTION A: SHORT ANSWER QUESTIONS
1.A _________________ translates a program written in high level
language into the equivalent machine code.
2. A program written in high level language can also be referred
to as the ___________________________.
3.A program written in machine code can also be referred to as
_____________.
4.____________________ can be used to develop high level
language programs.
5.Every
C++
program
must
have
which
function?
_________________________.
6.Convenient abstractions used in C++ to perform input and
output operations are called ___________________.
7._____________ is the file extension that must be used to save a
C++ program.
8.The escape sequence that moves the cursor to the beginning of
the current line is called ____________________and is denoted by
__________________.
9.The symbol // denotes a ___________________ which is serves as
an aide to the _____________.
10. A ______________ is a portion of memory used to store a
value.
SECTION B: TRUE OR FALSE
1. 7.6 is an example of an integer. ____________________
2. Double floating point is a data type._________________
3. C++ language is not case sensitive.__________________
4. The keyword void stands for Valueless.__________________
5. int resut = 6; int result (6); and int result {6}; denote the
same thing.______________
6. Variable declaration is the same as initialization.
__________________
7. In C++, programmers cannot define their own constants.
____________

8. A constant once defined can be changed at any point in the


program. _______________
9. The data type for a variable in a cin extraction operation
does not need to be declared. ______________________
10.
The ENTER key on the keyboard needs to be pressed
in order for data to be recognized during a cin extraxtion
operation. ________________
SECTION C: DEBUGGING
State the line numbers and the specific errors in the following C+
+ Program.
1 /A simple C++ Program to display three lines of text with
simple calculations.
2 /*************************************************************
3 include<iostream>
4 using space std;
5 integer main
6 {
7 integer a, b, c;
8 a = 6.5;
9 b=8
10c = 2;
11cout<<A Simple C++ Program.<<endl
12cout The sum of a, b and c is: <<a+b+c<<endl;
13cout<< The difference between b and c is: <<a-c<<endl;
14return ;
15

1.

SECTION D: PROGRAM CODING


Write a C++ Program to perform the following:
a) Display your Full Name, Registration (or JAMB) Number and
Department on three different lines.
b) Initialize I and R to the sum of the first four and the sum of
the last four digits of your registration number.
c) Display the Ohms Law Formular.

d) Calculate and display the Voltage without directly using your


values for I and R.
SUCCESS!!!

You might also like