Forum

CS201 Quiz 2 Soluti...
 
Notifications
Clear all

[Solved] CS201 Quiz 2 Solution


admin
Posts: 978
Admin
Topic starter
(@shahzain)
Member
Joined: 2 years ago

CS 201 Quiz # 2

 

1) Which one of the following is used to perform bit-wise exclusive OR operation>

  1. |
  2. ^
  3. ||
  4. ~

 

2) Structures are syntactically defined with the word __________.

  1. Struct
  2. Struc
  3. Structure
  4. None of the given

 

3) A character is stored in the memory in ________.

  1. Byte
  2. Integer
  3. String
  4. None of the given option

 

4)  a = a|b; can be written as ____________.

  1. a |=b;
  2. a ==b;
  3. a =|b;
  4. a=b;

 

5) eof is used to check for the ________ of file when a file is being read.

  1. End
  2. Name
  3. Start
  4. Middle

 

6) Which of the following code segment represents a left shift operator

  1. Cin >> number:
  2. Result=number <<1:
  3. Result = Number >>1:
  4. Cout<<1:

 

7) Strings are accessed by variable of type ______.

  1. Int
  2. Char
  3. None of given
  4. Double

 

8) We have opened a file stream my file for reading (getting), my file. Tellg () gives us the current get position of the file pointer. It returns a whole return of type _______.

  1. Long
  2. Double
  3. Int
  4. Short

 

9) Each array deceleration must provide the information about all these things expect______.

  1. Type of data stored in the array
  2. Name of array
  3. Number of elements of the array
  4. The location of the first element to be stored

 

10) Which mode of file is used to open a file or stream for interaction

  1. Out
  2. App
  3. In
  4. Ate

 

Topic Tags
Share:
Scroll to Top