Do you know that? **63% prerer the freelancer lifestyle insdead of full-time employment** next

All Job Interview Questions and Answers << Interview answers for C Programming - Variables and Data Storage

**This helps getting job:** Hundreds of (cover letter examples ^{5 new!}, interview questions , profile samples ) • Earn on Upwork (oDesk) **Job assistance:** jobs popularity • freelance rates

Interview answers verified by specialists.

Find interview questions and answers on this website:

If an operation is specified with operands of two different types, they are converted to the smallest type that can hold both values. The result has the same type as the two operands wind up having. To interpret the rules, read the following table from the top down, and stop at the first rule that applies. If Either Operand Is And the Other Is Change Them To long double-any other type-long double double-any smaller type-double float-any smaller type-float unsigned long-any integral type-unsigned long long-unsigned > LONG_MAX-long long-any smaller type-long unsigned-any signed type-unsigned The following example code illustrates some cases of operator promotion. The variablef1is set to 3/4. Because both 3 and 4 are integers, integer division is performed, and the result is the integer 0. The variablef2is set to 3/4.0. Because 4.0 is afloat, the number 3 is converted to afloatas well, and the result is thefloat0.75. #include <stdio.h> main() { float f1 = 3 / 4; float f2 = 3 / 4.0; printf("3 / 4 == %g or %g depending on the type used.\n", f1, f2); }