All India Exams
Home AptitudeBankEngineeringEnglishGKInterviewOnline TestPlacement PapersReasoning
  • Home
  • Aptitude
  • Bank
  • Engineering
  • English
  • GK
  • Interview
  • Online Test
  • Placement Papers
  • Reasoning

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?

Home EngineeringComputer Science & EngineeringC++ Multiple Choice Questions & AnswersMacros

Macros - C++ Questions and Answers

This is the c++ programming questions and answers section on "Macros" with explanation for various interview, competitive examination and entrance test. Solved examples with detailed answer description, explanation are given and it would be easy to understand.

Macros C++ Questions

Online Test Name Macros
Exam Type Multiple Choice Questions
Category Computer Science Engineering Quiz
Number of Questions 10
1. which keyword is used to define the macros in c++?
  • A. macro
  • B. define
  • C. #define
  • D. none of the mentioned
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option C

Explanation:

#define

Workspace

Report Error


2. Which symbol is used to declare the preprocessor directives?
  • A. #
  • B. $
  • C. *
  • D. ^
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option A

Explanation:

#

Workspace

Report Error


3. How many types of macros are there in c++?
  • A. 1
  • B. 2
  • C. 3
  • D. 4
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option B

Explanation:

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

Workspace

Report Error


4. What is the mandatory preprosessor directive for c++?
  • A. #define
  • B. #include
  • C. #undef
  • D. none of the mentioned
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option B

Explanation:

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

Workspace

Report Error


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;

}


  • A. 100.01
  • B. 100.1
  • C. compile time error
  • D. none of the mentioned
  • View Answer
  • Workspace
  • Report
  • Discuss

Answer & Explanation

Answer: Option A

Explanation:

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

Workspace

Report Error


  • «
  • 1
  • 2
  • »

Related Topics:

  • Pointers
  • Input Output Streams
  • Inheritance
  • Templates
  • Operators and Statements
  • Namespaces
  • Functions
  • Constants
  • Interfaces
  • Classes

Mock Tests & Online Quizzes

  • Aptitude Online Test

  • Reasoning Online Test

  • GK Online Test

  • English Online Test

  • RRB Mock Test

  • RBI Mock Test

  • Free SBI Mock Test

  • IBPS Mock Test FREE

  • SSC Mock Test

  • CAT Exam Mock Test

  • GATE Mock Test

  • IT Courses Quiz

Questions and Answers

  • Aptitude Questions
  • Verbal Reasoning Questions
  • Non Verbal Reasoning
  • Logical Reasoning Questions
  • Data Sufficiency Questions
  • Data Interpretation
  • eLitmus Sample Papers
  • ECE Questions and Answers
  • EEE Questions and Answers
  • Verbal Ability Questions
  • GK Questions

Programming Quiz

  • C Programming
  • C++ Programming
  • PHP Programming
  • Java Programming
  • Python Programming
  • DataScience MCQ
  • Hadoop MCQ
  • Mongo DB MCQ
  • MySQL MCQ

Interview Questions

  • Java Interview Questions
  • .Net Interview Questions
  • Networking Interview Questions
  • C Language Interview Questions
  • C++ Interview Questions
  • Testing Interview Questions
  • Android Interview Questions
  • HR Interview Questions
  • Group Discussion Topics

Our Sites

AView.in

© by AllIndiaExams.in. All Rights Reserved | Copyright | Terms of Use & Privacy Policy