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;
}

3.
Identify the incorrect statements.
int var = 10;
int *ptr = &(var + 1); //statement 1
int *ptr2 = &var; //statement 2
&&var = 40; //statement 3

4.
Pick the right option.
Statement 1: Global values are not initialized by the stream.
Statement 2: Local values are implicitly initialised to 0.

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;
}

Read More Section(Variables and Data Types in C plus plus)

Each Section contains maximum 100 MCQs question on Variables and Data Types in C plus plus. To get more questions visit other sections.