Skip to content
VUBuddy

CS201 Midterm MCQs Set 3 by VU Topper RM

Introduction to Programming PDF 926 KBUpdated 23 Oct 2026
Midterm past paper CS201 Midterm MCQs Set 3 by VU Topper RM PDF 926 KB
vubuddy.com
Type
Midterm past paper
Course
CS201 Introduction to Programming
Size
PDF 926 KB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 926 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 2, 3, 4 of 48. Download the file for all 48 pages.

In an n-dimensional array, we use _______ 'for loop(s)' to populate the array.

A. n

B. n+2 C. n+1 D. n-1

What will be the correct syntax for declaration of the following statement?"ptr is a constant pointer to an integer" A. const int *myptr; B. int const *ptr; C. const * int myptr;

D. int *const ptr ;

'\0' takes ________ space in the memory. A. 8 Bytes B. 4 Bytes C. 2 Bytes

D. 1 Bytes

What will be the output of the following C++ code?{ char str1[6] = " Hello"; char str3[5]; strcpy( str3, str1); cout <<strlen(str3) ; } A. 6 B. 8 C. 7

D. 5

For the following statement, how much memory will be allocated to myarray[1]?char * myarray[] = {" Arif", " Sadia"}; A. 7 Bytes

B. 6 Bytes

C. 5 Bytes D. 4 Bytes ifstream in File; refers ______________. A. object for editing in a file

B. object for reading from a file

C. object for writing to a file D. deleting a file

Character strings are terminated by ___________.

A. \0

B. \o C. \n D. \t

Which of the following is true about streams? A.It is a sequence of bytes B.It is an ordered sequence C.All bytes can go through the stream simultaneously D.Bytes that enters first into the stream will go out at last A. A and D B. A and B

C. A only

D. C only

The value of a pointer can be __________.

A. address of a variable

B. name of the variable C. value of the variable D. none of the given options

What is output of following code?int data[10] = {10,20,30,40,50,60,70,80,90,100};int *xptr = &data[4];int *yptr = &data[6];cout<<xptr + yptr++;

A. Syntax error

B. 110 C. 120 D. 130

When an identifier is declared with keyword const then, A. Its value can be changed with arithmetic operator B. Its value can be changed during execution.

C. Its value cannot be changed

D. Its value can be overwritten

We can read, write and manipulate the same file using ___________. A. iomanip.h

B. fstream.h

C. iostream.h D. stdio.h

The parameter passed to isdigit() function is ____________variable. A. Boolean

B. Character

C. Float D. Double

Following is an array of ________ rows and ________ columns. int num[3][4];

A. 3,4

B. 4,5 C. 2,3 D. 4,3

Strings are accessed by variable of type ___________. A. int

B. char

C. float D. double

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.