Search:

Type: Posts; User: c99tutorial

Search: Search took 0.01 seconds.

  1. Thread: data types

    by c99tutorial
    Replies
    15
    Views
    2,134

    I agree. To the OP, you don't need to be able...

    I agree.

    To the OP, you don't need to be able to store "either a letter or a number" if you are just trying to store the value of a playing card. A playing card consists of two items: a value and...
  2. Thread: data types

    by c99tutorial
    Replies
    15
    Views
    2,134

    In C there is technically no difference between a...

    In C there is technically no difference between a letter and an integer. Consider this example:



    int x = 97;
    int y = 'a';


    x contains the integer 97 and y contains the 'a'. But in fact the...
  3. Thread: data types

    by c99tutorial
    Replies
    15
    Views
    2,134

    Probably the easiest way is to make an array of...

    Probably the easiest way is to make an array of strings. If the string contains "123" then it is a number. If the string contains "a" for example, then it is a letter. This is sometimes called...
  4. Thread: data types

    by c99tutorial
    Replies
    15
    Views
    2,134

    It sounds like you want `count' to be an array....

    It sounds like you want `count' to be an array. For example, if the user enters 10 items, then you want an array int count[10]
Results 1 to 4 of 4