Search:

Type: Posts; User: Daveo

Search: Search took 0.01 seconds.

  1. Thread: Return Statement

    by Daveo
    Replies
    21
    Views
    12,381

    Given the memory setup shown, fill in the chart...

    Given the memory setup shown, fill in the chart by indicating the data type and value of each reference as well as the name of the function in which the reference would be legal. Give pointer values...
  2. Thread: Return Statement

    by Daveo
    Replies
    21
    Views
    12,381

    Thanks for the input guys/gals.........really...

    Thanks for the input guys/gals.........really gonna help me in the final exam! I hope you guys dont mind if I ask more questions later on when I stumble over something I dont understand. :)
  3. Thread: Return Statement

    by Daveo
    Replies
    21
    Views
    12,381

    Also, could you please clarify what this means: ...

    Also, could you please clarify what this means:


    file type *variable name;

    What does the * mean?

    Some tell me that when you see that, it jsut meanst that the variable is a pointer.
    ...
  4. Thread: Return Statement

    by Daveo
    Replies
    21
    Views
    12,381

    Also Brian, the way use have used prototypes is...

    Also Brian, the way use have used prototypes is different from what I use.

    Your way is like this:


    int sum(int, int);

    My way - they way I have been taught:
  5. Thread: Return Statement

    by Daveo
    Replies
    21
    Views
    12,381

    Do you mean: If its not, im confused. :(

    Do you mean:



    If its not, im confused. :(
  6. Thread: Return Statement

    by Daveo
    Replies
    21
    Views
    12,381

    Also from the above code, how does *signp,...

    Also from the above code, how does *signp, *wholep, & *fracp know when to store results when it doesnt have the address. I cannot see anywhere in the code where &num is used to store the address.
  7. Thread: Return Statement

    by Daveo
    Replies
    21
    Views
    12,381

    void sperate(double num, char *signp, int...

    void
    sperate(double num, char *signp, int *wholep, double *fracp)
    {
    double magnitude;

    if(num < 0)
    *signp = ' - ';
    else if(num == 0)
    ...
  8. Thread: Return Statement

    by Daveo
    Replies
    21
    Views
    12,381

    :) .

    :) .
  9. Thread: Return Statement

    by Daveo
    Replies
    21
    Views
    12,381

    Thanks Sean! Now, is there any difference...

    Thanks Sean!

    Now, is there any difference between:

    pointer type* pointer variable name;

    and

    pointer type *pointer variavle name;
  10. Thread: Return Statement

    by Daveo
    Replies
    21
    Views
    12,381

    Also, im having a hard time understanding the...

    Also, im having a hard time understanding the basics of pointers. Could you guys direct me to the right place, possibly a tutorial on pointers that is not hard, and easy to understand for someone...
  11. Thread: Return Statement

    by Daveo
    Replies
    21
    Views
    12,381

    Return Statement

    Ive have been reading several books regarding this topic, and all books state that the return statement can only return one value of result.

    How does this happen when you can return something like...
  12. Thread: Pointers...

    by Daveo
    Replies
    9
    Views
    1,345

    More questions....sorry! Now, say I have the...

    More questions....sorry!

    Now, say I have the following structure:



    typedef struct
    {
    int date, month, year;
    }date_t;
  13. Thread: Pointers...

    by Daveo
    Replies
    9
    Views
    1,345

    Thanks for the help and clarification guys. ...

    Thanks for the help and clarification guys.

    Now, how come every function that passes a pointer as an argument, there is a code for status. Whats this for? Also, the the number in status = to the...
  14. Thread: Pointers...

    by Daveo
    Replies
    9
    Views
    1,345

    When I have an input function, then I will have...

    When I have an input function, then I will have to use pointers (outputs) as arguments,

    AND

    When I have an output function, then I dont have to use pointers as arguements.

    Is this correct?
    ...
  15. Thread: Prototypes

    by Daveo
    Replies
    3
    Views
    855

    Prototypes

    What is the point of the prototype?

    I dont see how it aids the program.

    Like, why do you need to add something just before the main program:



    int scan_function(int number)
  16. Thread: Pointers...

    by Daveo
    Replies
    9
    Views
    1,345

    Say I need a function that needs to get...

    Say I need a function that needs to get information from the user...

    Do I do the following?



    get_date(date_t *date)
    {
    scanf("%d%d%d", &(*date).day, &(*date).month,...
  17. Thread: Pointers...

    by Daveo
    Replies
    9
    Views
    1,345

    Pointers...

    When should I use pointers when it comes to creating an input/output function?
  18. Replies
    22
    Views
    5,198

    Prime Number stops after 29, but why?

    This program I have written up has to print all the prime numbers between 1-10,000 However, for some reason, its only prints out prime numbers up to 29.



    #include <stdio.h>
    #include <math.h>...
  19. Thread: Questions

    by Daveo
    Replies
    1
    Views
    1,148

    Questions

    #include <stdio.h>
    #include <math.h>
    #include <conio.h>

    int number, result;
    double square_number;

    int
    square(int number)
    {
Results 1 to 19 of 19