Looking at the number of students in their higher secondary classes like XIth and XIIth, having very little idea of their topics in Computer Science, I am here to offer my expertise in helping such students ace their exams and at the same time develop an interest in subjects like C++, Data structures, SQL, Java etc.
Posting some of my recorded sessions and Notes here:-
Some have already been posted at this blog Uncomplicatelife.blogspot.com
Although would make it available here altogether soon.
Some "Predict Output" problems here:
functions question set
A function can not be overloaded only by its return type.
a. True
b. False
Question 2:
A function can be overloaded with a different return type if it has all the parameters same.
a. True
b. False
Question 3:
Inline functions involves some additional overhead in running time.
a. True
b. False
Question 4:
A function that calls itself for its processing is known as
a. Inline Function
b. Nested Function
c. Overloaded Function
d. Recursive Function
Question 5:
We declare a function with ______ if it does not have any return type
a. long
b. double
c. void
d. int
Question 6:
Arguments of a functions are separated with
a. comma (,)
b. semicolon (
c. colon (
d. None of these
Question 7:
Variables inside parenthesis of functions declarations have _____ level access.
a. Local
b. Global
c. Module
d. Universal
Question 8:
Observe following function declaration and choose the best answer:
int divide ( int a, int b = 2 )
a. Variable b is of integer type and will always have value 2
b. Variable a and b are of int type and the initial value of both variables is 2
c. Variable b is international scope and will have value 2
d. Variable b will have value 2 if not specified when calling function
Question 9:
The keyword endl
a. Ends the execution of program where it is written
b. Ends the output in cout statement
c. Ends the line in program. There can be no statements after endl
d. Ends current line and starts a new line in cout statement.
Question 10:
Strings are character arrays. The last index of it contains the null-terminated character
a. \n
b. \t
c. \0
d. \1
Question 1:
The void specifier is used if a function does not have return type.
a. True
b. False
Question 2:
You must specify void in parameters if a function does not have any arguments.
a. True
b. False
Question 3:
Type specifier is optional when declaring a function
a. True
b. False
Question 4:
Study the following piece of code and choose the best answer
int x=5, y=3, z;
a=addition(x,y)
a. The function addition is called by passing the values
b. The function addition is called by passing reference
Question 5:
In case of arguments passed by values when calling a function such as z=addidion(x,y),
a. Any modifications to the variables x & y from inside the function will not have any effect outside the function.
b. The variables x and y will be updated when any modification is done in the function
c. The variables x and y are passed to the function addition
d. None of above are valid.
Question 6:
If the type specifier of parameters of a function is followed by an ampersand (&, that function call is
a. pass by value
b. pass by reference
Question 7:
In case of pass by reference
a. The values of those variables are passed to the function so that it can manipulate them
b. The location of variable in memory is passed to the function so that it can use the same memory area for its processing
c. The function declaration should contain ampersand (& in its type declaration
d. All of above
Question 8:
Overloaded functions are
a. Very long functions that can hardly run
b. One function containing another one or more functions inside it.
c. Two or more functions with the same name but different number of parameters or type.
d. None of above
Also plan to solve queries and take up revision and regular online sessions on various topics through google hangout, Skype and Wiziq.com
I would appreciate if I get some comments and messages from students for their queries and doubts.