⟩ The output of this program? #include <iostream> using namespace std; ostream & operator<<(ostream & i, int n) { return i; } int main() { cout << 5 << endl; cin.get(); return 0; } a) 5 b) 6 c) error d) runtime error
c) error
c) error
What is the output of this program? #include <iostream> using namespace std; int main() { int a[2][4] = {3, 6, 9, 12, 15, 18, 21, 24}; cout << *(a[1] + 2) << *(*(a + 1) + 2) << 2[1[a]]; return 0; } a) 15 18 21 b) 21 21 21 c) 24 24 24 d) Compile time error
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
What is size of generic pointer in c? a) 0 b) 1 c) 2 d) Null
How many minimum number of functions are need to be presented in c++? a) 0 b) 1 c) 2 d) 3
What is meaning of following declaration? int(*p[5])(); a) p is pointer to function. b) p is array of pointer to function. c) p is pointer to such function which return type is array. d) p is pointer to array of function
Output of this program? #include <iostream> using namespace std; int main() { int i; char *arr[] = {"C", "C++", "Java", "VBA"}; char *(*ptr)[4] = &arr; cout << ++(*ptr)[2]; return 0; } a) ava b) java c) c++ d) compile time error
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
The output of this program? #include <iostream> using namespace std; int main() { int arr[] = {4, 5, 6, 7}; int *p = (arr + 1); cout << *p; return 0; } a) 4 b) 5 c) 6 d) 7
How many max number of arguments can present in function in c99 compiler? a) 99 b) 90 c) 102 d) 127
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