Search:

Type: Posts; User: pheininger

Page 1 of 6 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    1
    Views
    439

    You have declared a string using char...

    You have declared a string using


    char s[3];
    How many characters can this string hold besides the nul termination character '\0'?

    Please post the errors which your compiler is producing...
  2. Replies
    4
    Views
    687

    Function declarations which are not prototypes

    I am glad you found your root cause and you were able to correct it.

    There is one more lesson possible in your example. Most of your function declarations including the one for remove() are...
  3. Thread: while loop

    by pheininger
    Replies
    82
    Views
    5,759

    I do not think so. Version 1 "getNumber to be...

    I do not think so.
    Version 1 "getNumber to be a function "


    /* Function definition */
    /* getNumber is a function which takes no parameters, returns nothing, and does nothing. */
    void...
  4. Replies
    3
    Views
    532

    The following code is a fairly generic "Do you...

    The following code is a fairly generic "Do you want to continue?" code. This code is untested.



    #include <stdio.h>

    void PlayAGame(void)
    {
    /* Replace wth the code for playing a game */
    }
  5. Replies
    5
    Views
    682

    What do you think srand() does? It "seeds" the...

    What do you think srand() does? It "seeds" the random number generator. In almost all cases (I do not know of an exception), it should only be called once in a program. rand() returns the...
  6. Not quite, in order to incorporate array/matrix...

    Not quite, in order to incorporate array/matrix in a function, you may define and/or declare it as: <the type of vars inside the array> <the name of the array> <[a1][a2][a3][]...[][an]> (the number...
  7. Also posted here: signal function definited...

    Also posted here:
    signal function definited twice with no error: how is it possible?
  8. Replies
    9
    Views
    749

    As others have indicated, you are having problems...

    As others have indicated, you are having problems without trying to use functions.
    Where does the function main() on line 16 end?
    Where does the while loop that begins on line 28 end?
    What is the...
  9. Thread: few doubts

    by pheininger
    Replies
    8
    Views
    972

    Commenting on Q1: In C, the type char is...

    Commenting on Q1:

    In C, the type char is implementation defined if it is signed or unsigned. In C, it is implementation defined whether signed integers use two's complement (most common), one's...
  10. Replies
    50
    Views
    3,236

    [Removed]

    [Removed]
  11. Replies
    4
    Views
    972

    What warnings are you getting when you compile? ...

    What warnings are you getting when you compile? If none, increase the level of warnings you get.

    I am getting several warnings, but two seem to concern me.

    On the fseek call, why are you...
  12. Replies
    4
    Views
    1,666

    Questions to which you need to decide the answers

    It is clear to me that you do not understand what your data structures look like or in other words contain. You need to decide for yourself before you start coding what your data structures would...
  13. Replies
    7
    Views
    1,128

    You probably think that you have described your...

    You probably think that you have described your problem well. But you have not.

    So I am going to ask several questions. You should be able to answer them for yourself. Hopefully, this will...
  14. Replies
    14
    Views
    1,745

    In addition to the advice you have been given...

    In addition to the advice you have been given (and will be given) about learning C programming, I would consider some options for improving the situation.

    1) Is there more than one instructor of...
  15. Replies
    102
    Views
    33,470

    Because your open statement uses "/dev/ttyUSB0",...

    Because your open statement uses "/dev/ttyUSB0", I assume that you are using a *nix operating system with a USB simulated serial port. It is not clear from the information you provided if the basics...
  16. Replies
    8
    Views
    8,766

    I would change the prototype and the definition...

    I would change the prototype and the definition to be:


    void fnMenu(void)


    The item in the declaration list:


    void fnMenu();
  17. Replies
    68
    Views
    5,518

    So when do you want to free the matrix A? After...

    So when do you want to free the matrix A? After the first one or when you get the second one? How can you tell if you already have a matrix A (or B or C or D)?
  18. Replies
    68
    Views
    5,518

    Using the command sequence from message #27 and...

    Using the command sequence from message #27 and the code from message #55, after the first command is given, what is stored for matrix A? Please explain why you think so. Or use your debugger to...
  19. ... @pheininger Below are the answers to your...

    ...
    @pheininger

    Below are the answers to your question:
    On line 12, what is the type of the parameter to floor() function? What is the type of the expression num/2?

    1. The type of parameter...
  20. On line 12, what is the type of the parameter to...

    On line 12, what is the type of the parameter to floor() function? What is the type of the expression num/2?

    What is the purpose of the loop on lines 21 through 24?

    What is the purpose of the...
  21. Replies
    41
    Views
    6,793

    So how do you define "is dividable"? For...

    So how do you define "is dividable"?
    For example, how do you know if a number (named anumber) is dividable by a possible factor (named apossiblefactor)?
    How would your write the contents of the...
  22. Replies
    41
    Views
    6,793

    So how would you do it by hand with paper and...

    So how would you do it by hand with paper and pencil?

    For example, how would you know if 17571 is prime or not by using paper and pencil?

    What is the definition of a prime?
  23. Replies
    12
    Views
    2,358

    Or to put it another way, when i is ((unsigned...

    Or to put it another way, when i is ((unsigned long)UINT_MAX+1UL)/2UL, what is i*2?
    Hint: I think it is 0.

    Edit: Or to be pedantic, I think it is 0U.
  24. Replies
    25
    Views
    7,479

    Also posted in devshed forum...

    Also posted in devshed forum.
  25. Replies
    11
    Views
    4,112

    According to ledow's errors and warnings, you...

    According to ledow's errors and warnings, you have errors on lines 51 and 284 and warnings on lines 85, 87, 89, 91, 99, 100, and 194. Sometimes the actual error is before the line that gets the...
Results 1 to 25 of 148
Page 1 of 6 1 2 3 4