1. Define a macro named IS_LEAP_YEAR(year) that determines whether year is a leap year or not. Use it in a program that accepts the year from the keyboard and outputs an appropriate message using a...


1. Define a macro named IS_LEAP_YEAR(year) that determines whether year is a leap year or not. Use it in a program that accepts the year from the keyboard and outputs an appropriate message using a switch statement.


2. Write a program containing the DISPLAY_VAR macro which displays, say, area3 = 20 when invoked as DISPLAY_VAR(area, 3). Accept three values from the keyboard into the variables area1, area2 and area3 and use the macro to display their values.


3. Write the relevant code for opening a fi le foo which resides on /home/henry/progs on Linux and F:\henry\progs on a Windows system. Use the symbolic constant OS to determine the operating system.



May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here