Professional Documents
Culture Documents
Q1. Write macro definitions with arguments for calculation of Simple Interest and
Amount. Store these macro definitions in a file called “interest.h”. include this file
in your program, and use the macro definitions for calculating simple interest and
amount.
Q2. What is macro? Explain the difference between object macro and function
macro with example.
Q3. Write a program to receive a 8-bit number into a variable and then set its odd
bits to 1.
Q4. Write a program to receive an 8-bit number into a variable and then exchange
its higher 4 bits with lower 4 bits.
Q5. Explain the use of bitwise operators in programming with suitable example.