C++ Type Conversion

Why does 'float' accept 'int' but not 'char'?

Questions by cutegal4u

Showing Answers 1 - 3 of 3 Answers

Anugya Singh

  • Sep 4th, 2012
 

There is nothing wrong in this coding because character c will accept the value a and due to swapping the floar k will accept the ASCII code of the letter a which is 97.......So the value of k is 97.

  Was this answer useful?  Yes

Appar

  • Sep 24th, 2012
 

Float variable can hold both of the variables either char or int.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions