CS201P Quiz 10 by Iqra Azhar
- Type
- Quiz
- Course
- CS201P Introduction to Programming (Practical)
- Size
- PDF 638 KB
- Updated
- 23 Oct 2026
You get 3 free files a day on the website. Add the Chrome extensionSign in with the extension for 30 a day.
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
Related CS201P files
All CS201P files →Get more out of VUBuddy, for free
- Unlimited downloads
- The explanation behind every MCQ answer
- Study offline on slow data
- 30 downloads a day instead of 3
- Sign in and buy Pro Semester here
One Pro Semester membership works in both the extension and the app.