Thread: C++ people we need help

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    9

    Exclamation C++ people we need help

    Hello,
    Ok, my question is; if "a" is an int, "b" is a double, and "c" is a char, what is the type of value returned by the expression "a - b"?

    I just dont under stand it. If you know what an int, double, or char is please tell me!

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    ok look at it like this....

    an int is a whole number.It has no fractional part.
    a double is a real number that can have a fractional part.
    10 is an int
    0.5 is a double.

    10 - 0.5 = int/double ??

    you see if you can work it out.
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. God
    By datainjector in forum A Brief History of Cprogramming.com
    Replies: 746
    Last Post: 12-22-2002, 12:01 PM
  2. Some people
    By Cgawd in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 11-27-2002, 05:15 PM
  3. I'm worried about some of the people wanting to program...
    By damonbrinkley in forum A Brief History of Cprogramming.com
    Replies: 14
    Last Post: 11-23-2002, 07:38 AM
  4. British people - Gibralter requests your support
    By stevey in forum A Brief History of Cprogramming.com
    Replies: 19
    Last Post: 05-17-2002, 10:10 PM
  5. Why do people thing viruses are cool?
    By VirtualAce in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 11-12-2001, 04:55 AM