CS201 QUIZ NO 1 SOLVED SPRING 2019 FILE 7|| 100% VERIFIED|| VURANK

CS201 QUIZ NO 1 SOLVED 100% VERIFIED BY ADMIN (MID TERM SYLLABUS)

Q1: What will be the size of the array declared as
int array[1000];
A) 999
B) 1000
C) 1001 (100% Sure)
D) 1002

Q2: Suppose that an integer type contains a memory address 0x22f220. What will be the new memory address if we increment this pointer by one?
A) 0x22f221
B) 0x22f222
C) 0x22f223
D) 0x22f224 (100% Sure)

Q3: We use __________ to open a file or stream for extraction.
A) in (100% Sure)
B) out
C) app
D) ate

Q4: Whenever some number is added in an array name, it will jump as many __________ as the added number.
A) rows (100% Sure)
B) value
C) column
D) None of the given

Q5: From following; which one is the correct syntax of an array initialize: Array size is 10 and it is of double data type to value 0?
A) arr[10]={0.0};
B) double arr[10]=0.0;
C) double arr[10]={0.0}; (100% Sure)
D) double arr[]=0.0;

Q6: An object of __________ class can be created of saving the current position of any opened file before reading from the file.
A) Stream
B) Filepos
C) Streampos (100% Sure)
D) Filestream

Q7: What will be the size of the following character array?
char name[]="Adeel";
A) 5
B) 6 (100% Sure)
C) 4
D) 7

Q8: We can say that a pointer is a variable that hold the __________ address.
A) byte code
B) source code
C) memory (100% Sure)
D) compiler

Q9: By default, the starting index of an array in C++ is __________.
A) 2
B) -1
C) 0 (100% Sure)
D) 1

Q10: Given a two dimensional array of integer, what would be the correct way of assigning the value 6 to the element at third row and fourth column?
A) array[3][4]=6; (100% Sure)
B) array[2][4]=6;
C) array[4][3]=6;
D) array[2][3]=6;