CPP

CPP

Function Declarations has 9 Questions

Where does the execution of the program starts?

user-defined function
main function
void function
none of the mentioned
What are mandatory parts in function declaration?

return type,function name
return type,function name,parameters
both a and b
none of the mentioned
which of the following is used to terminate the function declaration?

:
)
;
none of the mentioned
How many max number of arguments can present in function in c99 compiler?

99
90
102
127
Which is more effective while calling the functions ?

call by value
call by reference
call by pointer
none of the mentioned
What is the output of this program?
  1.     #include 
  2.     using namespace std;
  3.     void mani()
  4.     void mani()
  5.     {
  6.         cout<<"hai";
  7.     }
  8.     int main()
  9.     {
  10.         mani();
  11.         return 0;
  12.     }

hai
haihai
compile time error
none of the mentioned
What is the output of this program?
  1.     #include 
  2.     using namespace std;
  3.     void fun(int x, int y)
  4.     {
  5.         x = 20;
  6.         y = 10;
  7.     }
  8.     int main()
  9.     {
  10.         int x = 10;
  11.         fun(x, x);
  12.         cout << x;
  13.         return 0;
  14.     }

10
20
compile time error
none of the mentioned
What is the scope of the variable declared in the user definied function?

whole program
only inside the {} block
both a and b
none of the mentioned
How many minimum number of functions are need to be presented in c++?

0
1
2
3