Skip to content
VUBuddy

CS201 All Term Papers Pages 1-63 by Eagle Eye

Introduction to Programming PDF 1.1 MBUpdated 23 Oct 2026
Quiz CS201 All Term Papers Pages 1-63 by Eagle Eye PDF 1.1 MB
vubuddy.com
Type
Quiz
Course
CS201 Introduction to Programming
Size
PDF 1.1 MB
Updated
23 Oct 2026
Free download 0 of 3 used today
Download free · 1.1 MB

You get 3 free files a day on the website. Add the Chrome extension for 30 a day.

Unlimited downloads in the Android app Get it free on Google Play

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)

  1. 7
  2. 8
  3. 9
  4. 10

Q3. The condition in while loop may contain logical expression but not relational expression. (1 marks)

  1. True
  2. False

Q4. Searching is easier when an array is already sorted (1 marks)

  1. True
  2. False

Q5. If an array has 100 elements, what is allowable range of subscripts? (1 marks)

  1. 0 - 99
  2. 1 - 99
  3. 0 - 100
  4. 1 - 100

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)

  1. int arr[2][3] = {0,0} ;
  2. int arr[2][3] = {{0},{0}} ;
  3. int arr[2][3] = {0},{0} ;
  4. int arr[2][3] = {0} ;

Q8. Which of the following function returns the size of a string variable? (1 marks)

  1. strlength()
  2. stringlen()
  3. strlen()
  4. strLength()

Q9. What will be the range of numbers generated by function rand () % 9? (1 marks)

  1. 0 to 9
  2. 1 to 9
  3. 0 to 8
  4. 1 to 8

Q11. Computer can understand only machine language code. (1 marks)

  1. True
  2. False

Q13. What does 5 ^ 6 , evaluate to in decimal where ‘^’ is Exclusive OR operator? (1 marks)

  1. True
  2. False

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)

  1. Terminate normally
  2. Indicate Runtime error
  3. Indicate Compile time error
  4. Crashes

Q15. Which of the following header file include string conversion functions? (1 marks)

  1. string.h
  2. stdlib.h
  3. ctype.h
  4. sconvert.h

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:-

All CS201 files →
CS201 Introduction to Programming All CS201 handouts, past papers, quizzes and MCQs in one place. Open course page

Get more out of VUBuddy, for free

Android app Free on Google Play
  • Unlimited downloads
  • The explanation behind every MCQ answer
  • Study offline on slow data
Get the Android app
Chrome extension Free on the Chrome Web Store
  • 30 downloads a day instead of 3
  • Sign in and buy Pro Semester here
Add to Chrome

One Pro Semester membership works in both the extension and the app.