We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

CS 201 QUIZ NUMBER 01 OPENING DATE 24011-14  CLOSE DATE 25-11-14


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

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

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)


Views: 3049

Replies to This Discussion

quiz and solutions please guys

Return type of a function that does not return any value must be ________.
Select correct option:
char
int
void
double

Question # 2 of 10 ( Start time: 05:26:52 PM ) Total Marks: 1
A function’s prototype is written __________the function call.
Select correct option:
After
Before
With
At the end of

Question # 3 of 10 ( Start time: 05:28:12 PM ) Total Marks: 1
What will be the size of the following character array? char name[] = “Adeel”;
Select correct option:
5
6
4
7

Question # 4 of 10 ( Start time: 05:29:43 PM ) Total Marks: 1
In switch statement there can be _______ default statements.
Select correct option:
1
2
3
4

Question # 5 of 10 ( Start time: 05:31:16 PM ) Total Marks: 1
_________ will be used for enclosing function statements into a block.
Select correct option:
" "
()
[]
{}

Question # 6 of 10 ( Start time: 05:32:57 PM ) Total Marks: 1
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?
Select correct option:
arr[10] = {0.0};
double arr[10]= 0.0;
double arr[10] = {0.0};
double arr[] = 0.0;

Question # 7 of 10 ( Start time: 05:33:54 PM ) Total Marks: 1
Which of the function call is call by value for the following function prototype? float add(int);
Select correct option:
add(&x);
add(x);
add(int x);
add(*x);

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 *)

add(&x);
add(int x);
add(x);
add(*x); *


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

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
Address

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

 

  1. What is the correct syntax to declare an array of 15 elements of type float?
  2. From the following; which one is the range of Random number generator function rand()?                (0 and 32767) Ans
  1. When No. of repetition is known then we use the _______ structure to perform repetition tasks                         (while loop) Ans
  2. Loops are _______________ Structure       (Repetition)Ans
  1. When the break statement is encountered in a loop’s body, it transfers the control ________from the current loop.

(When a break statement is encountered in a loop, the loop terminates immediately. The control exits the inner most loop if there are nested loop) ans

  1. By default, the starting index of an array in C++ is _______ (zero)Ans (starting point is zero and ending point is less than one)
  1. A while loop may execute ________or more times.(Zero)Ans
  1. In C/C++, by default arguments are passed by _______ to a function (value) I think value but not confirmed

1:              If we pass more than one arguments to a function then they are separated by ___________.
Comma ,

2:               Which of the following function call is “call by reference” for the following function prototype? int add (int *);
add(*x);
3:               _________statement is used to terminate the processing of a particular case and exit from switch structure.
if
4:              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
any fruit

5:              How many times the following do-while loop will execute? int k = 10; do { cout "Statements" endl; k -= 2; } while(k>0);


6:                Using a segment of source code again by adding new functionalities with slight or no modification is termed as ____________.
Code modification
7:              While loop becomes infinite in which scenario _______.
When the condition is always False
8:               ___________ are used to compile the code.

compiler
9:             In do while loop the condition is checked __________ one execution of loop.
after


1:              Which of the following will be the most appropriate data type to store the value 63.547?

        Float
2:             The result of 4%3 will be
1

3:           It is the job of ________ to transfer the executable code from hard disk to main memory.
Loader

4:         Compiler translates high level language program into _________ language code
Machine

5:         In call by reference, __________ of a variable is passed to the called function.
address
6:        What will be the output of the following while loop? int counter = 0 ; while(counter < 15) cout counter “ ”; counter++;
Compile time error


7:             ______ Loop executes atleast one times.
do while
8:        In which language the compiler of C language is written?
C

9:         According to c++ norms; the first character of a variable name must be an alphabet or
Special character

My Quizz#1, Question#1

My Quizz#1, Question#2

My Quizz#1, Question#3

My Quizz#1, Question#4

My Quizz#1, Question#5

RSS

Latest Activity

M. Shaaf Tariq updated their profile
15 minutes ago
Tasha liked +M.Tariq Malik's discussion VU New Grading Scheme For Semester Fall 2020
18 minutes ago
Shahid Nawaz Khan replied to +M.Tariq Malik's discussion How To Prepare for Grand Quiz (Mid Term Quiz) Of Virtual University Of Pakistan
19 minutes ago
M. Shaaf Tariq liked +M.Tariq Malik's group ISL201 Islamic Studies
30 minutes ago
+M.Tariq Malik liked Azhar Sagar's discussion Be Aware ! Make your Final Year Project By yourself
30 minutes ago
+M.Tariq Malik liked Azhar Sagar's discussion Make your SRS Step By step(Complete Free Project Help)
30 minutes ago
Profile IconIfra Malik, Salbia batool, Ali Fahad and 15 more joined Virtual University of Pakistan
35 minutes ago
+M.Tariq Malik liked +M.Tariq Malik's discussion Corporate Laws Made Easy Notes CA Notes, CA Past Papers, ICAP Notes
36 minutes ago
Neelam Javed replied to +M.Tariq Malik's discussion MGT301 Online Quiz No 01 Fall 2020 Solution / Discussion in the group MGT301 Principles of Marketing
49 minutes ago
Neelam Javed joined +M.Tariq Malik's group
49 minutes ago
+ ! ! ! ! " Sуe∂α " liked Hafiza Tehreem Fatima's discussion BIRTHDAY CELEBRATION OUR BELOVED <MEMBER SARAH ABDUL
52 minutes ago
Azhar Sagar added 2 discussions to the group CS619 Final Project
1 hour ago
+αηαѕтαѕιуα❥ liked Hafiza Tehreem Fatima's discussion BIRTHDAY CELEBRATION OUR BELOVED <MEMBER SARAH ABDUL
2 hours ago
+αηαѕтαѕιуα❥ replied to Hafiza Tehreem Fatima's discussion BIRTHDAY CELEBRATION OUR BELOVED <MEMBER SARAH ABDUL
2 hours ago
Musfira Kharal updated their profile
3 hours ago
+ ! ! JS ! ! + liked Hafiza Tehreem Fatima's discussion BIRTHDAY CELEBRATION OUR BELOVED <MEMBER SARAH ABDUL
9 hours ago

© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.