Programming in C - Master Assignment

41. Consider the following statement.
# define hypotenuse(a, b) sqrt (a * a + b * b ) ;
The macro-call hypotenuse ( a + 2, b + 3) ;

  • Option : D
  • Explanation :
    The macro call will be expanded as
    sqrt(a + 2 * a + 2 + b + 3 * b +3).
    i.e, sqrt(3 * a + 4 * b + 5). Hence the answer.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


42. The ascending order of precedence of the bit-wise operators &, ^, | is

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


43. The scope of a macro definition

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


44. lint is

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *


45. Which of the following comments are correct when macro definition includes arguments?

Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *