CS201 All Term Papers Pages 1-63 by Eagle Eye
- Type
- Quiz
- Course
- CS201 Introduction to Programming
- Size
- PDF 1.1 MB
- 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 63. Download the file for all 63 pages.
Fall 2008 CS201Introduction to Programming (Session - 2) Time: 60 min Marks: 38
Q1. What is the output of the following statement? (1 marks)
int i = 2.5; do { cout i * 2; } while (i > 3 && i < 10); (a) 510 (b) 5 (c) 48
(d) error
Q2. What does !(7) evaluate to in decimal where ! is a NOT operator? (1 marks)
Q3. The condition in while loop may contain logical expression but not relational expression. (1 marks)
Q4. Searching is easier when an array is already sorted (1 marks)
Q5. If an array has 100 elements, what is allowable range of subscripts? (1 marks)
Q6. What will be the value of ‘a’ and ‘b’ after executing the following statements? a = 3; (1 marks)
b = a++;
(a) 3, 4 (b) 4, 4 (c) 3, 3
(d)
4, 3
Q7. value 0? (1 marks)
Q8. Which of the following function returns the size of a string variable? (1 marks)
Q9. What will be the range of numbers generated by function rand () % 9? (1 marks)
Q11. Computer can understand only machine language code. (1 marks)
Q13. What does 5 ^ 6 , evaluate to in decimal where ‘^’ is Exclusive OR operator? (1 marks)
Detail:- It mean 5 = 0101 6 = 0110 5 ^ 6 = 0011 If both input is same then the output is 0 and if different then output is 1
Q14. If the file is not properly closed in the program, the program ____________. (1 marks)
Q15. Which of the following header file include string conversion functions? (1 marks)
Q16. In Program commenting the code liberally is (1 marks)
Solution:- It need to be self-contained and understandable. Comments should be placed liberally. The comments should explain the logic, not the mechanics. Try to avoid fancy programming.
Q17. Which header file must be included while handling files? (1 marks)
Solution:- <fstream.h>
Q18. What is meant by C++ statement: const int *ptr = &x; (1 marks)
Solution:- ptr is a pointer to data of type const int type. And to assign the address of x to pointer ptr
Q19. What is a truth Table? (2 marks)
Solution:- We know the concept of truth table. The truth tables are very important. These are still a tool available for analyzing logical expressions. We will read logic design in future, which is actually to do with chips and gate. We find it difficult to evaluate a complicated logical expression. Sometimes the logic becomes extremely complicated so that even writing it as a simple syntax statement in any language.
Q20. (1) An array day is declared as: int day[] = {1, 2, 3, 4, 5, 6, 7}; (3 marks)
How many elements does array 'day' has?
Solution:-
Related CS201 files
All CS201 files →- CS201 Highlighted Handouts by VUBuddy Highlighted PDF 3.8 MB
- CS201 Final Term Past Papers Final term PDF 1.7 MB
- CS201 Short Notes Set 2 by VUBuddy Quiz PDF 660 KB
- CS201 Solved Quiz 2 Spring 2023 by Muhammad Zaman Quiz PDF 1.2 MB
- CS201 C++ Notes by Sonu Ilyas Quiz PDF 392 KB
- CS201 MCQs by Izhar MCQs PDF 606 KB
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.