Skip to content
VUBuddy

CS201P Quiz 2023 by Danish Hanif

Introduction to Programming (Practical) PDF 409 KBUpdated 23 Oct 2026
Quiz CS201P Quiz 2023 by Danish Hanif PDF 409 KB
vubuddy.com
Type
Quiz
Course
CS201P Introduction to Programming (Practical)
Size
PDF 409 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 409 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, 3 of 5. Download the file for all 5 pages.

Paid Services Available 10/10 Marks Guarantee · CS201p Quiz File · Jun 05, 2023 12:00 AM

Q1. Which of the following is the first step in FOR loop?

  1. Termination condition
  2. Incrementing condition
  3. Continuation condition
  4. Initialization condition

Q2. Which of the following expression is correct in C/C++ language?

  1. Y + X = 7
  2. 3 = X + 3
  3. X = X + 3
  4. X + 5 = Y + 7

Q3. What will be the output of the following piece of code?

int square(int number)

int result = 0;

result = number * number;

return result;

int main()

cout<<square(9); A. 99 B. 99 C. 49 D. 81

Q4. In C++, cout is known as ______.

  1. input stream
  2. output stream
  3. file stream
  4. error stream

Q5. Which of the following is an example of logical operator?

  1. /,%
  2. +,*
  3. &&,||
  4. <,>

Q6. While programming in C++, the statement if (x = 3), will result into a ______.

  1. Linker Error
  2. Syntax Error
  3. Runtime Error
  4. Logical Error

Q7. Learning “how to program” is important, because it develops _______ and problem-solving abilities.

  1. Listening
  2. Reading
  3. Writing
  4. Analytical

Q8. Which of the following structure is correct for WHILE loop?

  1. While (condition)
  2. While (start; condition; end)
  3. While (condition; end)
  4. While (start; condition)

Q9. What will be the output of the following code?

int i = 0;

while(i!=15){

cout << i << " ";

i = i + 5;

A. 1 5 10 B. 5 10 C. 0 5 D. 0 5 10

Q10. What will be the output of the following code?

int i = 1;

while(i<10){

if (i / 2 == 2)

cout << i << “ ”;

i++;

A. 2 4 B. 6 7 C. 4 5 D. 2 3

All CS201P files →
CS201P Introduction to Programming (Practical) All CS201P 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.