Macrofunctions, inline functions, functions with implicit parameters, functions with a variable number of parameters, overloading functions.

Define a macro function MAX that determines and display the maximum among 2(3) numbers introduced from the KB. Define an inline function min() that determines and display the minimum among 2(3) numbers introduced from the KB. Consider a function with 3 implicit parameters (int, float, double) that returns the product of the values. Call that function with different variants for effective parameters. Using functions overloading define 3 functions with the same name but with different prams type (int, int*, int&) that will return the square root of the value.

  1. Define a macro function MAX that determines and display the maximum among 2(3) numbers introduced from the KB.
  2. Define an inline function min() that determines and display the minimum among 2(3) numbers introduced from the KB.
  3. Consider a function with 3 implicit parameters (int, float, double) that returns the product of the values. Call that function with different variants for effective parameters.
  4. Using functions overloading define 3 functions with the same name but with different prams type (int, int*, int&) that will return the square root of the value. Analyze the calling mechanism by value and reference.
  5. Determine the minimum of a 10 float numbers from a string (implicit values or from the KB) using a function with a variable number of parameters. The first 7 values will be considered initially, next the last 3 and at the end these 2 values.
  6. Write a program that performs a simple coding operation by increasing with 3 the value of the ASCII code of a character using macro functions. For example, A becomes C, etc.
  7. Write a program that displays the name of the program, the compilation date and time and the number of code lines included in the program.
  8. Implement a C/C++ application that applies (using a macro function) a binary mask to each element located in an array of characters. Define the decoding function, too. Example: considering the character a and the mask code 11001010: a. the coding result will be obtained as it follows: ‘a’ -> 97 ASCII ->01100001 EXCLUSIVE OR Binary code 11001010

10101011 b. the decoding process: the coded result -> 10101011 EXCLUSIVE OR binary code 11001010

01100001 the ASCII code of a