adplus-dvertising
frame-decoration

Question

What will be the output of these two programs?
1.

    #ifndef Exercise_H
    #define Exercise_H
    int num = 842;
    #endif

2.

    #include <iostream>
    #include "exe.h"
    using namespace std;
    int main(int argc, char * argv[] )
    {
        cout << number++;
        return 0;
    }

a.

842

b.

843

c.

compile time error

d.

none of the mentioned

Answer: (a).842

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of these two programs?

Similar Questions

Discover Related MCQs

Q. What is the defualt type oof linkage that are available for identifires?

Q. To use external linkage we have to use which keyword?

Q. Which is used to use a function from one source file to another?

Q. What is the use of no linkage?

Q. What is the user-defined header file extension in c++?

Q. Which of the following keyword is used to declare the header file?

Q. Identify the incorrect statement .

Q. What does a default header file contain?

Q. setprecision requires which of the following header file?

Q. Which of the following header file does not exist?

Q. Which of the header file must be included to use stringstream?

Q. Which of the following header files is required for creating and reading data files?

Q. What does your class can hold?

Q. How many specifiers are present in access specifiers in class?

Q. Which is used to define the member of a class externally?

Q. Which other keywords are also used to declare the class other than class?

Q. Which of the following is a valid class declaration?

Q. The fields in the class in c++ program are by default

Q. Constructors are used to

Q. When struct is used instead of the keyword class means, what will happen in the program?