Ques 1 Function
The execution of a C++ Program starts with the?
a) user define function
b) main function
c) void function
d) All of these
Ques 2 Function
How many minimum numbers of functions are in any C++ Program?
a) 0
b) 1
c) 2
d) 3
Ques 3 Function
Which of the following correct way to define a function with default arguments?
a) int sum(int x=10,int y,int z){}
b) int sum(int x=10,int y,int z){}
c) int sum(int x,int y=10,int z=20){}
d) All of these
Ques 4 Function
What is the output of the following C++ Code?
#include <iostream> using namespace std; int sum(int a=10, int b=20, int c){ return a+b+c; } int main() { cout<< sum(30); }
Ques 5 Function
What is the output of the following C++ Code?
#include <iostream> using namespace std; int temp() { static int x=10; cout<<x<<" "; x+=2; } int main() { temp(); temp(); }