CS201P Quiz 2023 by Danish Hanif
- Type
- Quiz
- Course
- CS201P Introduction to Programming (Practical)
- Size
- PDF 409 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 5. Download the file for all 5 pages.
Q1. Which of the following is the first step in FOR loop?
Q2. Which of the following expression is correct in C/C++ language?
Q3. What will be the output of the following piece of code?
int square(int number)
int result = 0;
result = number * number;
return result;
int main()
cout<<square(9); A. 99 B. 99 C. 49 D. 81
Q4. In C++, cout is known as ______.
Q5. Which of the following is an example of logical operator?
Q6. While programming in C++, the statement if (x = 3), will result into a ______.
Q7. Learning “how to program” is important, because it develops _______ and problem-solving abilities.
Q8. Which of the following structure is correct for WHILE loop?
Q9. What will be the output of the following code?
int i = 0;
while(i!=15){
cout << i << " ";
i = i + 5;
A. 1 5 10 B. 5 10 C. 0 5 D. 0 5 10
Q10. What will be the output of the following code?
int i = 1;
while(i<10){
if (i / 2 == 2)
cout << i << “ ”;
i++;
A. 2 4 B. 6 7 C. 4 5 D. 2 3
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.