t02BFirstCProgram

t02BFirstCProgram - A First C Program (mixing datatypes)

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Dale Roberts A First C Program (mixing datatypes) www.kite-legends.blogspot.com
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Dale Roberts Data Type Conversion Data Type Conversion Rule #1 Rule #1 char, short char, short int int float float double double Rule #2 Rule #2 (double (double long long unsigned unsigned int) int) If either operand is double , the other is converted to double , and the result is double Otherwise, if either operand is long , the other is converted to long , and the result is long Otherwise, if either operand is unsigned , the other is converted to unsigned , and the result is unsigned Otherwise, the operand must be int www.kite-legends.blogspot.com
Background image of page 2
Dale Roberts Examples Examples Example : c: char, u: unsigned, i: int, d: double, f:float, s: short, l: long, Expression Final Data Type Explanation c – s / i int short int, int/int, char int, int-int u * 3 – i unsigned int(3) unsigned, unsigned*unsigned=unsigned, int unsigned, unsigned-unsigned=unsigned
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/08/2010 for the course CSE 2017 taught by Professor Kittu during the Spring '10 term at APIIT.

Page1 / 5

t02BFirstCProgram - A First C Program (mixing datatypes)

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online