Example 55: Arithmetic Operation

Learn how to perform numerous arithmetic operations using macro definitions.

We'll cover the following

Problem

Write down macro definitions for the following:

  1. To find the arithmetic mean of two numbers
  2. To find the absolute value of a number
  3. To convert an upper case alphabet to lower case
  4. To obtain the biggest of three numbers

Solution

Given below is our recommended way to approach this problem.

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.