• wonderlic tests
  • EXAM REVIEW
  • NCCCO Examination
  • Summary
  • Class notes
  • QUESTIONS & ANSWERS
  • NCLEX EXAM
  • Exam (elaborations)
  • Study guide
  • Latest nclex materials
  • HESI EXAMS
  • EXAMS AND CERTIFICATIONS
  • HESI ENTRANCE EXAM
  • ATI EXAM
  • NR AND NUR Exams
  • Gizmos
  • PORTAGE LEARNING
  • Ihuman Case Study
  • LETRS
  • NURS EXAM
  • NSG Exam
  • Testbanks
  • Vsim
  • Latest WGU
  • AQA PAPERS AND MARK SCHEME
  • DMV
  • WGU EXAM
  • exam bundles
  • Study Material
  • Study Notes
  • Test Prep

FREE AND STUDY GAMES ABOUT COMPUTER SCIENCE

Class notes Jan 11, 2026
Preview Mode - Purchase to view full document
Loading...

Loading study material viewer...

Page 0 of 0

Document Text

PDF Download

FREE AND STUDY GAMES ABOUT COMPUTER SCIENCE

E#2 EXAM QUESTIONS

Actual Qs and Ans Expert-Verified Explanation

This Exam contains:

-Guarantee passing score -60 Questions and Answers -format set of multiple-choice -Expert-Verified Explanation Question 1: When a loop is nested inside another loop, the outer loop goes through all its iterations for each iteration of the inner loop.

Answer:

False

Question 2: In C++, !, &&, and || are called relational operators.

Answer:

False Question 3: Suppose sum, num, and j are int variables, and the input is 4 7 12 9 -1. What is the output of the following code?cin >> sum; cin >> num; for (j = 1; j <= 3; j++) { cin >> num; sum = sum + num;

} cout << sum << endl;

Answer:

24 Question 4: The ideal loop to use for validating a value entered at the keyboard is

Answer:

do-while Question 5: If the code below is executed and the user enters 10 20 30 40 -1, the output will be: int num, accu = 0; cin>>num; while(num != -1) { accu = accu + num; cin>>num; } cout<

Answer:

100 Question 6: To use a predefined value-returning function in a program, the programmer only needs to know the appropriate header file, the name of the function, and the type of the value returned by the function.

Answer:

False

Question 7: Consider the following code.

int limit; int counter = 0; cin >> limit; while (counter < limit) { cin >> entry;

triple = entry * 3; cout << triple; counter++; } cout << endl; This code is an example of a(n) ____ while loop.

Answer:

counter-controlled Question 8: Consider the following code. (Assume that all variables are properly declared.) cin >> ch; while (cin) { cout << ch; cin >> ch; } This code is an example of a(n) ____ while loop.

Answer:

EOF-controlled Question 9: To use the predefined function abs, the program must include the header file ctype.

Answer:

False

Question 10: for (outcount = 1; outcount <= 2; outcount++ ) {

for (incount = 1; incount <= 3; incount++ ) cout << incount << ' '; cout << endl; } What is the output after the statements above execute?

Answer:

123

123

Question 11: If the code below is executed, the output will be: int x = 3; do { cout< 1);

Answer:

  • 2

Question 12: What is the output of the following C++ code?

int j; for (j = 10; j <= 10; j++) cout << j << " "; cout << j << endl;

Answer:

10 11 Question 13: To use a predefined function, the program must include the appropriate header file.

Answer:

True

Question 14: The ++ operator

Answer:

All of the above Question 15: Relational and logical expressions allow to incorporate decision making into programs.

Answer:

True

Download Study Material

Buy This Study Material

$11.99
Buy Now
  • Immediate download after payment
  • Available in the pdf format
  • 100% satisfaction guarantee

Study Material Information

Category: Class notes
Description:

PDF Download FREE AND STUDY GAMES ABOUT COMPUTER SCIENCE E#2 EXAM QUESTIONS Actual Qs and Ans Expert-Verified Explanation This Exam contains: -Guarantee passing score -60 Questions and Answers -for...

UNLOCK ACCESS $11.99