Skip to content
VUBuddy

CS201 Midterm Past Paper 2

Introduction to Programming PDF 437 KBUpdated 23 Oct 2026
Midterm past paper CS201 Midterm Past Paper 2 PDF 437 KB
vubuddy.com
Type
Midterm past paper
Course
CS201 Introduction to Programming
Size
PDF 437 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 437 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 7. Download the file for all 7 pages.

To access the data members of structure, _______ is used.

  1. dot operator
  2. dereference operator
  3. logical operator
  4. address operator

C is widely known as development language of _______ operating system.

  1. Linux
  2. Windows
  3. Unix
  4. Mac OS

What will be the result of arithmetic expression 6+27/3*3?

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

How many bytes are occupied by declaring following array of characters? char str[] = “programming”;

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

Declaring structures does not mean that memory is allocated.

  1. True
  2. False

What will be the value of i and j in the following code segment? int i, j ;

int x[5] = {2, 3, 4, 8, 9} ; · int *ptr =&x[2]; · i = (*ptr)++ ;

j = *ptr++ ;

  1. i = 5, j = 5
  2. i = 5, j = 8
  3. i = 4, j = 8
  4. i = 5, j = 9

When an array element is passed to a function, it is passed by ----------------.

  1. reference
  2. data type
  3. value
  4. data

Which of the following is a correct way to initialize a variable x of int type with value 10?

  1. int x ; x = 10;
  2. int x = 10;
  3. int x, x = 10;
  4. x = 10;

In C, direction of expression evaluation is from _______________.

  1. Right to Left
  2. Left to Left
  3. Left to Right
  4. Right to Right

What is the size of following array?

char str[] = “abcd”;

  1. 2
  2. 3
  3. 4
  4. 5

Let ptr1 and ptr2 are pointer variables that points to integer data types then which one of the following arithmetic is allowed?

  1. ptr1 + ptr2
  2. ptr1 - ptr2
  3. ptr1 * ptr2
  4. ptr1 / ptr2

A variable declared inside a code block becomes ________ variable for that block.

  1. Global
  2. Static
  3. Local
  4. Inner
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.