C++ people we need help

This is a discussion on C++ people we need help within the C++ Programming forums, part of the General Programming Boards category; Hello, Ok, my question is; if "a" is an int, "b" is a double, and "c" is a char, what ...

  1. #1
    K&J
    K&J is offline
    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, 11:01 AM
  2. Some people
    By Cgawd in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 11-27-2002, 04: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, 06: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, 03:55 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21