πŸ“Š C Programming
Q. Which of the following will be the type of ‘res’?
Code:
res = (float)x * (int)y / (long)w * (double)z
  • (A) double
  • (B) float
  • (C) long
  • (D) int
πŸ’¬ Discuss
βœ… Correct Answer: (A) double

Explanation: If both operands are “int” or “char”, the result is “int”. If both are “float” or “doubles”, the result is “double”.

Explanation by: Admin
If both operands are “int” or “char”, the result is “int”. If both are “float” or “doubles”, the result is “double”.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
170
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Admin
Publisher
πŸ“ˆ
89%
Success Rate