Macros Questions And Answers
Here you can find Macros Questions and Answers.
Why Macros Questions and Answers Required?
In this Macros Questions and Answers section you can learn and practice Macros Questions and Answers to improve your skills in order to face technical inerview conducted by Banks. By Practicing these
interview questions, you can easily crack any Bank Exams interview.
Where can I get Macros Questions and Answers?
AllIndiaExams provides you lots Macros Questions and Answers with proper explanation. Fully solved examples with detailed answer description. All students, freshers can download Macros Questions and
Answers as PDF files and eBooks.
How to solve these Macros Questions and Answers?
You no need to worry, we have given lots of Macros Questions and Answers and also we have provided lots of FAQ's to quickly answer the questions in the Bank Exams interview.
Macros Questions and Answers
1. which keyword is used to define the macros in c++?
Macros Questions and Answers
2. Which symbol is used to declare the preprocessor directives?
Macros Questions and Answers
3. How many types of macros are there in c++?
Macros Questions and Answers
4. What is the mandatory preprosessor directive for c++?
Macros Questions and Answers
5. What is the output of this program?
#include < iostream >
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;
}
Macros Questions and Answers
6. What is the output of this program?
#include < iostream >
using namespace std;
int main ()
{
cout << "Value of __LINE__ : " << __LINE__ << endl;
cout << "Value of __FILE__ : " << __FILE__ << endl;
cout << "Value of __DATE__ : " << __DATE__ << endl;
cout << "Value of __TIME__ : " << __TIME__ << endl;
return 0;
}
Macros Questions and Answers
7. What is the output of this program?
#include < iostream >
using namespace std;
#define SquareOf(x) x * x
int main()
{
int x;
cout << SquareOf(x + 4);
return 0;
}
Macros Questions and Answers
8. What is the output of this program?
#include < iostream >
using namespace std;
#define PR(id) cout << "The value of " #id " is "<
int main()
{
int i = 10;
PR(i);
return 0;
}
Macros Questions and Answers
9.
What is the output of this program?
#include < iostream >
using namespace std;
#define MAX 10
int main()
{
int num;
num = ++MAX;
cout << num;
return 0;
}
Macros Questions and Answers
10. What is the other name of the macro?