CS201P Quiz by Iqra Azhar
- Type
- Quiz
- Course
- CS201P Introduction to Programming (Practical)
- Size
- PDF 567 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 8. Download the file for all 8 pages.
Q1. In C++, which operator is used for memory allocation?
- Allocate_memory
- New ✅
- Calloc
- Allocate
Q2. Which one is the correct syntax to declare the friend function?
- FRIEND friend_function_name(int, char);
friend return_type friend_function_name(int, char); ✅
- FRIEND return_type friend_function_name(int, char);
- Friend return_type (int, char);
- The data members that are visible only from inside the class and hidden from the outside are known as:
- Private ✅
- Public
- Private and Public
- Friend
- An entry in an online encyclopedia that refers to another entry whose title has been changed is an example of:
Dangling pointer ✅
- This pointer
- Reference pointer
5. In C/C++ language, memory at runtime is allocated from:
- Stack
- Hard disk
- ROM
Free store (heap) ✅
- If the memory in the free store is not sufficient enough to fulfill the request, malloc() function returns:
- NULL ✅
- -1
- 0
- 1
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.