Skip to content
VUBuddy

CS201 Midterm Solved MCQs Set 2 by Moaaz and Asad

Introduction to Programming PDF 260 KBUpdated 23 Oct 2026
Midterm past paper CS201 Midterm Solved MCQs Set 2 by Moaaz and Asad PDF 260 KB
vubuddy.com
Type
Midterm past paper
Course
CS201 Introduction to Programming
Size
PDF 260 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 260 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 19. Download the file for all 19 pages.

CS201- Introduction to Programming · Latest Solved Mcqs from Midterm Papers · May 07,2011 · Lectures 1-22

asad Asad Ali

Latest Mcqs

Spring 2010

Q1. In order to get 256 from the number 2568 we divide this number by 10 and take, (1 marks)

  1. Its remainder
  2. The number
  3. Its quotient
  4. Its divisor

Correct answer: Its quotient

Q2. The correct syntax of do-while loop is, (1 marks)

  1. (condition ) while; do { statements; };
  2. { statements; } do-while ();
  3. while(condition); do { statements; };
  4. do { statements; } while (condition);

Correct answer: do { statements; } while (condition);

Q3. Which of the following function(s) is/are included in stdlib.h header file? (1 marks)

  1. double atof(const char *nptr)
  2. int atoi(const char *nptr)
  3. char *strcpy ( char *s1, const char *s2)
  4. 1 and 2 only (Pg 191)

Correct answer: 1 and 2 only (Pg 191)

Q4. If the break statement is missed in switch statement then, (1 marks)

  1. The compiler will give error
  2. This may cause a logical error (Pg 76)
  3. No effect on program
  4. Program stops its execution

Correct answer: This may cause a logical error (Pg 76)

Q5. The data type before a function name represents its, (1 marks)

  1. Return Type ( Pg 499)
  2. Function data
  3. Function arguments
  4. Function name

Correct answer: Return Type ( Pg 499)

Q6. Member function tellg() returns the current location of the _____________ pointer. (1 marks)

  1. tellptr()
  2. write()
  3. seekg()
  4. get() (Pg 215)

Correct answer: get() (Pg 215)

Q7. What does 5 | 6 , evaluate to in decimal where ‘|’ is bitwise OR operator? (1 marks)

  1. 3
  2. 4
  3. 5
  4. 7

5 | 6 =

0 1 1 1 = 7

Q8. C is widely known as development language of _______ operating system. (1 marks)

  1. Linux
  2. Windows
  3. Unix (Pg 12)
  4. Mac OS

Correct answer: Unix (Pg 12)

Q9. the result of arithmetic expression 6+27/3*3? (1 marks)

  1. 33
  2. 45
  3. 9
  4. 30

Correct answer: 9

Q10. How many bytes are occupied by declaring following array of characters? (1 marks)

char str[] = “programming”;

  1. 10
  2. 11
  3. 12
  4. 13

Correct answer: 12

Q11. the correct syntax for initialization of pointer ptr with string "programming"? (1 marks)

  1. char ptr = ’programming’ ;
  2. char *ptr = “programming” ;
  3. char *ptr = ‘programming’ ;
  4. *ptr = “programming” ;

Correct answer: char *ptr = “programming” ;

pg 166

array element in each array initialized with a single character enclosed in single quote. pg 21 While assigning a character value to a char type variable single quotes are used around the character as ‘a’.

Q12. What will be the result of expression x%= 2, if x = 7? (1 marks)

  1. x = 1
  2. x = 3
  3. x = 7
  4. x = 2

Q13. UNIX has been developed in ________ language. (1 marks)

  1. JAVA
  2. B
  3. C (pg 12)
  4. FORTRAN

Q14. Declaring structures does not mean that memory is allocated. (1 marks)

  1. True (Pg 229)
  2. False
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.