Programming in C
Programming in C
4th Edition
ISBN: 9780321776419
Author: Stephen G. Kochan
Publisher: Addison-Wesley
Question
Book Icon
Chapter 12, Problem 3E
Program Plan Intro

Program Plan:

  • Include the necessary header files into program.
  • Define the macro named “MIN()” to find out the minimum of two values.
  • Define the main function
    • Declare the variable “x” and “y” in type of integer.
    • Prompt and get the value of “x” and “y” from user.
    • Call the macro “MIN()”  in print function which passes “x” and “y” as argument and print the resultant value.

Blurred answer
Students have asked these similar questions
Set a macro with symbol ABOUTME with your Student ID and Full Name in the  replacement string.
Write an assembly program that has a macro maximum that finds the larger of two numbers inputted by the user. please show screenshot of output too
The Problem: Parameterized macros can cause unexpected things to happen. Consider the following case:#define SQUARE(x) ((x) * (x))int i = 5;int j = SQUARE(i++);What's the value of j? The answer is that it's compiler dependent. And the value of i is definitely not 6. Why? Just look at the code after the macro is expanded:int j = ((i++) * (i++));From this we can see that i is increment twice. Also since the order of the operations is not specified by the C++ standard, the actual value of j is compiler dependent.
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage