Open In App

Algorithms Quiz | SP2 Contest 1 | Question 15

Last Updated : 28 Aug, 2018
Like Article

Whenever there are two operands of different data types involved in an expression, then the one with lower rank automatically gets promoted to the data type with a higher rank. This is called Type Promotion in C. Below are some data types arranged in order of their ranks. Choose the correct order.
(A) double > float > int > unsigned

(B) int < unsigned < double < float
(C) int < unsigned < float < double

(D) float > double > int > unsigned

Answer: (C)

Explanation: Whenever we have two operands of different data types in an expression we convert the operand of lower rank to a data type of higher rank. The process is called Promotionof Type.

Quiz of this Question

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads