Programming in C - Constants, Variables and Data Types

27. If integer needs two bytes of storage, then maximum value of a signed integer is

  • Option : B
  • Explanation :
    In signed magnitude form, one bit is dedicated to store the sign(e.g., 1 for negative and otherwise). Only the remaining 15 bits are available to store the magnitude. Hence the answer.
Cancel reply
Cancel reply

28. The minimum number of temporary variables needed to swap the contents of two variables is

  • Option : D
  • Explanation :
    Without any temporary variable, one can swap two given variables.
Cancel reply
Cancel reply