1. Where does the execution of the program starts?
a) user-defined function
b) main function
c) void function
d) none of the mentioned
2. What are mandatory parts in function declaration?
a) return type,function name
b) return type,function name,parameters
c) both a and b
d) none of the mentioned
3. which of the following is used to terminate the function declaration?
a) :
b) )
c) ;
d) none of the mentioned
4. How many max number of arguments can present in function in c99 compiler?
a) 99
b) 90
c) 102
d) 127
5. Which is more effective while calling the functions?
a) call by value
b) call by reference
c) call by pointer
d) none of the mentioned
6. What is the output of this program?
a) hai
b) haihai
c) compile time error
d) none of the mentioned
7. What is the output of this program?
a) 10
a) 10
c) compile time error
d) none of the mentioned
8. What is the scope of the variable declared in the user definied function?
a) whole program
b) only inside the {} block
c) both a and b
d) none of the mentioned
9. How many minimum number of functions are need to be presented in c++?
a) 0
b) 1
c) 2
d) 3
a) user-defined function
b) main function
c) void function
d) none of the mentioned
2. What are mandatory parts in function declaration?
a) return type,function name
b) return type,function name,parameters
c) both a and b
d) none of the mentioned
3. which of the following is used to terminate the function declaration?
a) :
b) )
c) ;
d) none of the mentioned
4. How many max number of arguments can present in function in c99 compiler?
a) 99
b) 90
c) 102
d) 127
5. Which is more effective while calling the functions?
a) call by value
b) call by reference
c) call by pointer
d) none of the mentioned
6. What is the output of this program?
#include <iostream>
using namespace std;
void mani()
void mani()
{
cout<<"hai";
}
int main()
{
mani();
return 0;
}
b) haihai
c) compile time error
d) none of the mentioned
7. What is the output of this program?
#include <iostream>
using namespace std;
void fun(int x, int y)
{
x = 20;
y = 10;
}
int main()
{
int x = 10;
fun(x, x);
cout << x;
return 0;
}
a) 10
c) compile time error
d) none of the mentioned
8. What is the scope of the variable declared in the user definied function?
a) whole program
b) only inside the {} block
c) both a and b
d) none of the mentioned
9. How many minimum number of functions are need to be presented in c++?
a) 0
b) 1
c) 2
d) 3