C++ MQCs with Explanation (CHAPTER 3: TOKENS, EXPRESSIONS AND CONTRAL STRUCTURES)

The following statements implement type cast operation. Which one of them is illegal?

  1. x = y/(float)m;
  2. x = y/float(m);
  3. x = float(y)/(float)m;
  4. x = y/float m;



Answer: 
Option d: x = y/float m;

Explanation Here

Post a Comment

0 Comments