Skip to content
VUBuddy

CS201P Quiz 10 by Iqra Azhar

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

In the following code, what will be the output of i?

#include<iostream> using namespace std; main(){int i; int &j = i; i = 123; cout<< "\n The value of i =" << i;

012345x

X012345 the correct answer is 321.

The data members that are visible only from inside the class and hidden from the outside known as. Select the correct option Friend Private Public Private and Public Private

n C++, which operator is used for memory allocation?Select the correct option Allocate Calloc New Allocate_memory New

Data encapsulation can be achieved through ________.Select the correct option Structures Pointers Classes Arrays Classes. If the memory in the free store is not sufficient enough to fulfill the request, malloc () function returns

NULL

-1 NULL.

calloc() functions allocates multiple blocks of memory and each block have _______?Select the correct option Same size Same length Different size Different length same size.

In C/C++ language, memory at runtime is allocated from _______.Select the correct option ROM Stack Hard disk

In C++, sizeof operator is used to determine ____________.Select the correct option Number of words Size of data type Length of string Length of words the size of a data type

Where can we declare a friend function in the class?Select the correct option Anywhere Main() Nowhere Void Anywhere

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.