We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

www.vustudents.ning.com

 www.bit.ly/vucodes + Link For Assignments, GDBs & Online Quizzes Solution www.bit.ly/papersvu + Link For Past Papers, Solved MCQs, Short Notes & More

Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

# CS201 Quiz no. 1 Semester Fall 2014 From 15-05-2014 To 16-05-2014

 Quiz No. 1 Dated: May 06, 14 Dear Student,Quiz No. 1 of CS201 will be started from Thursday, May 15, 2014 and ends at Friday, May 16, 2014.  Quiz No. 1 will cover 8-12 lectures.  There will be 10 questions in the quiz. Share your Quiz here.............. thanks.

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?

Views: 5020

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

### Replies to This Discussion

Quiz CS201| Quiz Date: May 15, 2014 : 12 AM

Q1. The string in the array is terminated by a _______
zero
nil
null
one

Q2. We can define a matrix as__________ array.
Sorted
Unsorted
Single dimensional
Multi dimensional *

Q3. ___________character is used to indicate the end of the string.
string
New line *
Blank space
Null

Q4. In call by reference, __________ of a variable is passed to the called function.
Name
Data type *
Value

Q5. A function’s prototype is written __________the function call.
After
Before *

Q.6 Characters of a string stored in an array can be accessed directly using array _________.

Manipulation *
Superscript
Postscript
Subscript

Q7. Null character is used to indicate the __________ of string.
start
end *
begin
middle

Q8. If an array has 50 elements, what is allowable range of subscripts?
0 – 49 *
1 – 49
0 – 50
1 – 50

Q9. Return type of a function that does not return any value must be ________.
char
int
void *

Q.10. What is the output of the following code if the 3rd case is true switch (var) { case ‘a’: cout”apple”endl; case ‘b’: cout”banana”endl; case ‘m’: cout”mango”endl; default: cout”any fruit”endl; }
mango *
mango any fruit
apple

Quiz CS201| Quiz Date: May 15, 2014 : 7 : 00 PM

Q1. A function is a block of statements that can be defined once and used ________ in the program.

one time
2 time
three time
as many times as user wants

Q2. What will be the size of following array? int arr[29]

0
30
29
18

Q3. Which of the following function call is “call by reference” for the following function prototype? int add (int *)

Q4. The string in the array is terminated by a _______

0
nil
null *
on

Q5. if statement is used to terminate the processing of a particular case and exit from switch structure.

if
goto
break
continue
break i think

Q6. will be used for enclosing function statements into a block.
""
()
[]
{} *

Q7. Default mechanism of calling a function by passing it array is call by ________ and in case of passing variable is call by ________

Reference, Reference
Reference, value *
Value, Reference
Value, Value

Q8. What is the output of the following code, if the first case is true switch (var) { case ‘a’: cout”apple”endl; case ‘b’: cout”banana”endl; case ‘m’: cout”mango”endl; default: cout”any fruit”endl; }

apple
apple anyfruit
apple banana mango *
none of above

Q9. Null character is represented by _________ in C++.

/0
\0 *
\n
\t

Quiz CS201 | Quiz Date: May 15, 2014 : 11 : 00 PM

Q.1 What will be the size of the following character array? char name[] = “Adeel”;

5
6
7
4

Q2. In C/C++, by default arguments are passed by _______ to a function.

refrence
value
size

Q3. A function’s prototype is written __________the function call.

after , before,,
with
presedent keep qioye now

Q4. What will be the output of following code segment? for (int i = 2; i<10; i++){ if ( i == 5) continue; cout i "," ; }

2,3,7,8,9
2,3,4,6,7,8,9
2 3 4
4 6 7 8 9

Q5. When the break statement is encountered in a loop’s body, it transfers the control ________from the current loop.

inside

outside *

to break statment
to continue

Q6. _______statement is used to terminate the processing of a particular case and exit from switch structure.

if
foto
break
continue

Q7. Null character is used to indicate the __________ of string.

start
end
begin

Q8. Which of the following function call is “call by reference” for the following function prototype? int add (int *);

Q9. If an array has 50 elements, what is allowable range of subscripts?

0- 49

Q10. What will be the size of following array? int arr[29];
0
30
88

Quiz CS201| Quiz Date: May 16, 2014 : 11 : 00 AM

Q1. __________ of a variable means the locations within a program from where it can be accessed.

data type
isibility
value
refrence

Q2. char name [] = “Hello World” ; In the above statement, a memory of _________ characters will be allocated

13
11
12
10

Q3. What will be the size of the array declared as int array[1000];

999
1000
1001
1002

Q4. What will be the size of the following character array? char name[] = “Adeel”;

5
6
4
7

Q5. In C++, what will be the highest index of the following array? int array[15];

16
14
15

Q6. What is the output of the following code if the 2nd case is true switch (var) { case ‘a’: cout”apple”endl; case ‘b’: cout”banana”endl; case ‘m’: cout”mango”endl; default: cout”any fruit”endl; }

banana
banana any fruit
banana mango anyfruit
none of above

Q7. To manipulate n-dimensional array ________ nested loops are required.

n-1
n-2
n+1
n

Q8. Individual characters in a string stored in an array can be accessed directly using array _______.

subscript
script
value

Q9. What is the correct syntax to declare an array of 15 elements of type float?

float array[15];
float array[14];

Q.10 Null character is used to indicate the __________ of string.

start
end
begin
midel

Quiz CS201| Quiz Date: May 16, 2014 : 12 : 30 PM

Q1. In C-language the string “AZMAT” is equal to______________

Azmat
azmat
AZMAT

Q2. char name [] = “Hello World” ; In the above statement, a memory of _________ characters will be allocated

13
11
12
10

Q3. A function is a block of statements that can be defined once and used ________ in the program.

One time
Two times
Three times

Q.5 Total Marks: 1 If a function has not been declared before its definition, It is a

logical error
syntax error
run time error
None of these

Q.6_________ Keyword is used to return some value from a function.

break
return
next

Q7. In call by reference, __________ of a variable is passed to the called function.

Name
Data type

Q8. Switch statement can be used in place of _________ statement.

break
continue

Q9. From the following; which one is the range of Random number generator function rand()?

0 – 32768
1 – 32768
0 – 32767
1 – 32767

Q.10. ___________character is used to indicate the end of the string.

New line
Blank space
Null
E

Quiz CS201| Quiz Date: May 16, 2014 : 03 : 00 PM

Q1. What will be the output of following code segment? for (int i = 2; i<10; i++){ if ( i == 5) continue; cout i "," ; }

2,3,4,6,7,8,9

Q2. When we call a function, its control The compiler stops execution of whole program
returns to statement following function call
transfers to its definition
transfers to its Prototype

Q.3 If a function has not been declared before its definition, It is a

None of these
logic
syntax

Q.4 What will be the size of following array? int arr[29];

0
30
29
28

Q5. In switch statement there can be _______ default statements.

1
2
3
4

Q6. In call by reference, __________ of a variable is passed to the called function.

name
datatype
value

Q7. _________ Keyword is used to return some value from a function.

return
break

Q8. The ASCHI code of null character is___________

10
110
111
000

Q.9. What is the output of the following code, if the first case is true switch (var) { case ‘a’: cout”apple”endl; case ‘b’: cout”banana”endl; case ‘m’: cout”mango”endl; default: cout”any fruit”endl; }

apple
appleanyfruie
none of these

Q10. ________ operator is used to pass the address of a variable in call by reference method.

%
&

Quiz CS201| Quiz Date: May 16, 2014 : 03 : 00 PM

Q1. What will be the output of following code segment? for (int i = 2; i<10; i++){ if ( i == 5) continue; cout i "," ; }

2,3,4,6,7,8,9

Q2. When we call a function, its control The compiler stops execution of whole program
returns to statement following function call
transfers to its definition
transfers to its Prototype

Q.3 If a function has not been declared before its definition, It is a
None of these
logic
syntax

Q.4 What will be the size of following array? int arr[29];

0
30
29
28

Q5. In switch statement there can be _______ default statements.

1
2
3
4

Q6. In call by reference, __________ of a variable is passed to the called function.

name
datatype
value

Q7. _________ Keyword is used to return some value from a function.

return
break

Q8. The ASCHI code of null character is___________

10
110
111
000

Q.9. What is the output of the following code, if the first case is true switch (var) { case ‘a’: cout”apple”endl; case ‘b’: cout”banana”endl; case ‘m’: cout”mango”endl; default: cout”any fruit”endl; }
apple
appleanyfruie
none of these

Q10. ________ operator is used to pass the address of a variable in call by reference method.

%
&

Q11. Return type of a function that does not return any value must be ________.

void

Q.12. 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?

double arr[10] = {0.0};

Q.13. When we call a function, its control

transfers to its Prototype *
transfers to its definition

## Latest Activity

Aftab Nazir joined + M.Tariq Malik's group

### MTH101 Calculus And Analytical Geometry

15 minutes ago
+ ! Suspecious+ liked + ! Suspecious+'s discussion محبت یا خود غرضی؟؟؟؟؟
1 hour ago
+ ! Suspecious+ posted discussions
1 hour ago
1 hour ago
Ateeqa liked + ! ! ! ! ! ! Mobi's profile
1 hour ago
++PrInCeSss++ posted a discussion

### Black Day

1 hour ago
Mohammad Moeen Aslam joined + M.Tariq Malik's group

1 hour ago
2 hours ago
2 hours ago
2 hours ago

1

2

3