ExamVeda
Login
Home
41
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
#define MAX 10
int main()
{
    int num;
    num = ++MAX;
    cout << num;
    return 0;
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
42
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
void square (int *x)
{
    *x = (*x + 1) * (*x);
}
int main ( )
{
	int num = 10;
        square(&num);
        cout << num; 
        return 0;
    }
a) 100
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
43
What will initialize the list of arguments in stdarg.h header file?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
44
What is the meaning of the following declaration?
int(*ptr[5])();
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
45
How many types of macros are there in c++?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
46
Which is the correct syntax of declaring a namespace?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
47
What will be the output of the following C++ code?
#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;
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
48
How many can max number of arguments present in function in the c99 compiler?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
49
What is the default calling convention for a compiler in c++?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
50
which of the following is used to implement the c++ interfaces?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board