CS201 Midterm Solved MCQs by Waqar Siddhu
- Type
- Midterm past paper
- Course
- CS201 Introduction to Programming
- Size
- PDF 451 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 1, 2, 3 of 20. Download the file for all 20 pages.
CS201 Midterm McQs Solved Papers By Waqar Sidhu
(File 1)
Q1. Consider the following code segment. What will be the output of following code?
int addValue (int*a){ int b = (*a) + 2; return b;
main() { int x=6; cout<< x<< “,”; cout<<addValue(&x) << “x”; cout<< x;
- 6,6,8
- 6,8,8
- 6,6,6
Q2. Here the code is given below. You have to identify the problem in the code. while (i < 10) && (i > 24))
- The while loop is an exit-condition loop
- The test condition is always true
Q3. The correct syntax of do-while loop is ________.
- (condition) while; do ( {statement,};
- {statement;) do-while ();
- while(condition); do {statement;};
Q4. Matric is defined as ___________.
- Single dimensional array
- Vector product
- Scalar product
Q5. In programming, comment are used to explain the functioning of the _________.
- Debugger
- Editor
- Linker
Q6. Operating System is a type of a/an ____________.
- Application software
- Computer language
- Interpreter
Q7. From the options given, you need to choose the option which is true for the given code. for (int i = 1; i > 1; i++) {
/* loop code */
- The while loop is an exit-condition
- The test condition is always false
Q8. Which of the following value are used in C/C++ to represent true and false?
- 1 and -1
- 11 and 00
- Any numerical value
Q9. ‘while’ loop may execute ________ or more times.
- Three
- Two
- Once
Q10. Body of any function is enclosed within ___________.
Q11. What will be the correct syntax for initialization of a pointer ptr string “programming”?
- char ptr = ‘programming’;
- char*ptr = ‘programming’;
- *ptr = “programming”;
Q12. Which one of the given option is not a mode for reading/writing the data from a file?
- in
- out
- trunc
Q13. ___________ mode allows us to add data or change data anywhere in the file.
- iso::app
- iso::binary
- ios::edit
Related CS201 files
All CS201 files →- CS201 Midterm Mega File Midterm PDF 1.4 MB
- CS201 Midterm Solved Quiz 1 Midterm PDF 693 KB
- CS201 Midterm Subjective Papers by Waqar Siddhu Midterm PDF 3.2 MB
- CS201 Midterm MCQs by Waqar Siddhu Midterm PDF 7 MB
- CS201 Highlighted Handouts by Mickey Ch Highlighted PDF 5.1 MB
- CS201 Grand Quiz 3 by Lucky Quiz PDF 1.6 MB
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.