ExamVeda
Login
Home
1
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
enum  cat 
{
    temp = 7
};
int main()
{
    int age = 14;
    age /= temp;
    cout << "If you were cat, you would be " << age << endl;
    return 0;
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
2
For what values of the expression is an if-statement block not executed?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
3
Identify the incorrect statements.
int var = 10;
int *ptr = &(var + 1); //statement 1
int *ptr2 = &var; //statement 2
&&var = 40; //statement 3
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
4
Pick the right option.
Statement 1: Global values are not initialized by the stream.
Statement 2: Local values are implicitly initialised to 0.
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
5
Can two functions declare variables(non static) with the same name?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
6
Is the size of character literals different in C and C++?
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
7
What will be the output of the following C++ code?
#include <iostream>
using namespace std;
int main()
{
    void a = 10, b = 10;
    int c;
    c = a + b;
    cout << c;
    return 0;
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
8
Which is correct with respect to the size of the data types?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
9
Which of the following is not one of the sizes of the floating point types?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
10
. . . . . . . . have the return type void.
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board