Skip to content
VUBuddy

CS201 Quiz 1 Set 6

Introduction to Programming PDF 857 KBUpdated 23 Oct 2026
Quiz CS201 Quiz 1 Set 6 PDF 857 KB
vubuddy.com
Type
Quiz
Course
CS201 Introduction to Programming
Size
PDF 857 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 857 KB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

Preview text

Text from pages 1, 2 of 2. Download the file for all 2 pages.

Q1. Which operator has the highest precedence? (*, -, /, +)

  1. - has the highest precedence
  2. + has the highest precedence
  3. + and - both have the same highest precedence
  4. * and / both have the same highest precedence

Correct answer: * and / both have the same highest precedence

Q2. How many times the following loop will execute? int j = 3; while(j > 0) { cout << "Statements" << endl; j -= 2;

  1. 0
  2. 2
  3. 3
  4. 1

Correct answer: 2

Q3. ______ Loop executes atleast one times.

  1. Inner
  2. Do while
  3. While
  4. For

Correct answer: Do while

Q4. Identify the logical error in the following if condition If ((i < 5) && (i > 15))

  1. & will be used instead of &&
  2. && cannot be used with if condition
  3. Condition is always true
  4. Condition is always false

Correct answer: Condition is always false

Q5. What will be the values of variables x and y after executing the following code if x = 33 and y = 19? if(x % y != 0) { x++; y--; }

  1. x = 34, y = 18
  2. x = 22, y = 14
  3. x = 30, y = 36
  4. x = 14, y = 36

Correct answer: x = 34, y = 18

Q6. < , <= , > , >= are called __________ operators.

  1. Arithmetic
  2. Relational
  3. Conational
  4. Logical

Correct answer: Relational

Q7. If x = 11, and x %= 3, then value of x will be ___________.

  1. 11
  2. 3
  3. 0
  4. 2

Correct answer: 2

Q8. In the following nested For Loop, which loop will run most number of times? for( int i = 0; i < 5; i++) { for(int k = 0; k < 5; k++) { ……... } }

  1. Inner loop
  2. Both loops run equal number of times
  3. Outer loop
  4. Depends upon the statements in the inner loop's body

Correct answer: Inner loop

Q9. Find the syntax error in the following piece of code? if ( x > y); cout<<” x is greater than y “; else cout<<”y is greater than x”;

  1. Condition in the if statement is wrong
  2. Semicolon should not be after the if statement
  3. Braces not given for if and else blocks
  4. No error in the code

Correct answer: Semicolon should not be after the if statement

Q10. Which of the following is not the subcategory of the system software?

  1. Application software
  2. Operating system
  3. Utilities
  4. Device drivers

Correct answer: Application software

All CS201 files →
CS201 Introduction to Programming All CS201 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.