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

Applying OOP

The document appears to be an exam test for a module on applying object-oriented programming language skills. It contains 11 multiple choice questions testing concepts like comments in C++, output of code snippets, compiler functions, loops, and basic syntax.

Uploaded by

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

Applying OOP

The document appears to be an exam test for a module on applying object-oriented programming language skills. It contains 11 multiple choice questions testing concepts like comments in C++, output of code snippets, compiler functions, loops, and basic syntax.

Uploaded by

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

Institution Name Document No.

ወ/ሮ ስህን ፖሊቴክኒክ ኮሌጅ OF/WSPC /263-01


W/R SIHEEN POLYTECHNIC COLLEGE
Title: Issue No. Page No.
2 Page 1 of 2
TTLM

Module Title: Applying OOP Language Skills Exam Test


NAME ___________________________________ ID. No. _________________
I. chooses the correct answer for the following questions.

1. How do you insert COMMENTS in C++ code?


A. // this is a multiple comment C. /* this is a multiple
B. # this is a multiple comment comment*/
D. None of the above
2. What is the output of the following program?
int main () A. Hello

{ int x = 1; B. Hi

switch(x) { C. HelloHi

case 1 : D. None of them


cout << "Hi!" << endl;
break;
default :
cout << "Hello!" << endl;
}
}

3. Compiler generates _______ file. A. source code B.object code


C. text file D. none of the above
4. Which statement is used to receive data from keyboard?
A. cout>> B. cin>> C. cin<< D. cout<<
5. What is the size of an int data type?
A. 4 bytes B. 1 bytes C. 2 bytes D. 8 bytes
6. What will be the output of the following C++ code?
int main() A. 25

{ int a,b,c; B. 50

a = 10, b = 15; C. 20

a = 2 * a; b = 2 * b; D. 15
Institution Name Document No.

ወ/ሮ ስህን ፖሊቴክኒክ ኮሌጅ OF/WSPC /263-01


W/R SIHEEN POLYTECHNIC COLLEGE
Title: Issue No. Page No.
2 Page 1 of 2
TTLM
c = a + b;
cout << c;
return 0;
}

7. In which loop the condition is checked after the execution of statements?


A. do..while B. while C. for
8. What will be the output of the following C++ code?
int main() A. 0 1 2 3

{ int i; B. 4

for (i = 0; i < 4; i++) C. 0 1 2 3 4

{ D. compiler error
cout << i<<” “;
}
return 0;}
}

9. Which one is not a loop?


A. while B. for C. do..while D. have
10. What loop needs a semicolon?
A. while B. for C. do..while D. have
11. What will be the output of the following C++ code?
int main() A. 0 1 2 3

{ int i; B. 4

for (i = 0; i < 4; i++); C. 0 1 2 3 4

{ D. compiler error
cout << i<<” “;
}
return 0;}
}
Institution Name Document No.

ወ/ሮ ስህን ፖሊቴክኒክ ኮሌጅ OF/WSPC /263-01


W/R SIHEEN POLYTECHNIC COLLEGE
Title: Issue No. Page No.
2 Page 1 of 2
TTLM

You might also like