1.  Which symbol is used to declare the preprocessor directives ?


#
$
*
^


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

2.  What is the mandatory preprosessor directive for c++ ?


#define
#include
#underof
none of the mentioned


Answer

 Option

For a c++ program to execute, we need #include.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

3.  How many types of macros are there in c++ ?


1
2
3
4


Answer

 Option

There are two types of macros. They are object-like and function-like.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

4.  What is the output of this program ?
#include
using namespace std;
#define PR(id) cout << ‘’The value of ‘’ #id ‘’ is ‘’<int main()
{
int i = 10;
PR(i);
return 0;
}


10
15
20
none of the mentioned


Answer

 Option

No answer description available for this question.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report

5.  What is the output of this program ?
#include
using namespace std;
#define MIN(a,b) (((a)<(b)) ? a : b)
int main (
{
float i, j;
i = 100.1;
j = 100.01;
cout <<’’The minimum is ‘’ << MIN(i, j) << endl;
return 0;
}


100.01
100.1
compile time error
none of the mentioned


Answer

 Option

In this program, we are getting the minimum number using conditional operator.

Workspace

Report
Mail id: Report Error:

Answer Workspace Report