+ Link For Assignments, GDBs & Online Quizzes Solution |
+ Link For Past Papers, Solved MCQs, Short Notes & More |
CS 201 QUIZ NUMBER 01 OPENING DATE 24011-14 CLOSE DATE 25-11-14
Tags:
+ 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)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
(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: 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
© 2021 Created by + M.Tariq Malik.
Powered by
Promote Us | Report an Issue | Privacy Policy | Terms of Service
We are user-generated contents site. All product, videos, pictures & others contents on site don't seem to be beneath our Copyrights & belong to their respected owners & freely available on public domains. We believe in Our Policy & do according to them. If Any content is offensive in your Copyrights then please email at m.tariqmalik@gmail.com Page with copyright detail & We will happy to remove it immediately.
Management: Admins ::: Moderators
Awards Badges List | Moderators Group
All Members | Featured Members | Top Reputation Members | Angels Members | Intellectual Members | Criteria for Selection
Become a Team Member | Safety Guidelines for New | Site FAQ & Rules | Safety Matters | Online Safety | Rules For Blog Post