Search:

Type: Posts; User: csisz3r

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    6
    Views
    1,534

    You are still passing a pointer to a pointer to...

    You are still passing a pointer to a pointer to function parser...


    int main(void)
    {
    char kbuff[15];
    parser( &kbuff );
    }
  2. Replies
    16
    Views
    6,060

    if (data = within_x_percent(100,data,x)) ...

    if (data = within_x_percent(100,data,x))
    printf("%f is within 5 percent of the boiling point of water.\n", data);
  3. Thread: Is this bad?

    by csisz3r
    Replies
    6
    Views
    1,199

    I want to write an add_node function that will...

    I want to write an add_node function that will not depend on a global variable head.
  4. Thread: Is this bad?

    by csisz3r
    Replies
    6
    Views
    1,199

    Is this bad?

    #include <stdio.h>

    void change_x(int **x)
    {
    *x = (int *)10;
    }

    int main(void)
    {
    int *x = NULL;
  5. Canonicalize the coordinates of a rectangle??

    What does it mean to canonicalize the coordinates of a rectangle? I know it doesn' t have much to do with C programming but I read about it in the "The C Programming Language" book so I hope this is...
  6. Thread: Please Help

    by csisz3r
    Replies
    1
    Views
    780

    #include typedef struct{ int...

    #include <stdio.h>

    typedef struct{
    int number;
    int place;
    int postcode;
    } information_t;

    int test(information_t *in);
  7. Replies
    3
    Views
    7,085

    #include int main(int argc, char...

    #include <stdio.h>

    int main(int argc, char *argv[])
    {
    while (argc-- > 0)
    printf("%s ", argv[argc]);
    return 0;
    }
  8. Replies
    8
    Views
    7,666

    #include #include #include...

    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>

    int compare(const void *name1, const void *name2)
    {
    char *const *x = (char *const *)name1;
    char *const *y = (char *const...
  9. Replies
    8
    Views
    7,666

    swoopy, it won't work if I change the code to...

    swoopy, it won't work if I change the code to what you suggested :(
  10. Replies
    8
    Views
    7,666

    Compare function for qsort

    While looking for information on how to use the qsort function here on the board, I came across this:


    int compare(void const *name1, void const *name2)
    {
    char *const *x = (char *const...
  11. Replies
    3
    Views
    1,609

    On function players, what is the value of...

    On function players, what is the value of variable numo when you first use it?

    You can start from there...
  12. Replies
    5
    Views
    1,056

    It's ok, I don't like him much anyway :p ...

    It's ok, I don't like him much anyway :p

    That was exactly the problem... I was trying to increment an array. The authors mention that on the book. I gotta love them and pay more attention....
  13. Replies
    5
    Views
    1,056

    I know that works but I wanted to manipulate the...

    I know that works but I wanted to manipulate the pointer directly. What botters me the most is that I took that from the book The C Programming Language 2nd Edition and it is not working :mad:
  14. Replies
    5
    Views
    1,056

    Why isn't this working?

    #include <stdio.h>

    int main(void)
    {
    char *names[] = {"Meg", "John", "Susan", "Charlotte", "Mario"};
    unsigned int nelements = sizeof names / sizeof(*names);

    while (--nelements >...
  15. Replies
    3
    Views
    1,048

    Playing with pointers

    Consider this:


    #include <stdio.h>

    int main(void)
    {
    int c;
    char *argv[] = {"hello", "world"};
  16. Replies
    8
    Views
    6,437

    #include #include #include...

    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>

    int main(void)
    {
    char *p = NULL;
    char linha[100];
    char **strings = NULL;
    int c = 0;
  17. Replies
    8
    Views
    6,437

    Is this correct? #include ...

    Is this correct?


    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>

    int main(void)
    {
    char *p = NULL;
  18. Replies
    8
    Views
    6,437

    if ( numStrings == maxStrings ) { /* after...

    if ( numStrings == maxStrings ) {
    /* after this, I'll be able to store 10 strings in variable strings, right? */
    void *temp = realloc ( strings, (maxStrings+10) * sizeof *strings );
    if (...
  19. Replies
    7
    Views
    2,096

    No! :(

    No! :(
  20. Replies
    8
    Views
    6,437

    Dynamic array of pointers

    Hi. I'm learning about pointers and as an exercise I'm trying to create a program that will store an unknown number of pointers to strings that will be input by the user in an array of pointers.

    ...
  21. Replies
    7
    Views
    2,096

    "The following loop fills an array with integers...

    "The following loop fills an array with integers by calls to getint:


    int n, array[SIZE], getint(int *);

    for (n = 0; n < SIZE && getint(&array[n]) != EOF; n++)
    ;

    Each call sets...
  22. Replies
    7
    Views
    2,096

    Let's say the user enters the characters "123"....

    Let's say the user enters the characters "123". When the function finishes, pn[0] will be equal to 1, pn[1] will be equal to two, and pn[3] will be equal to 3, right? In this case, all characters are...
  23. Replies
    7
    Views
    2,096

    How do I use this function?

    I'm reading this wonderful book called The C Programming Language 2nd Edition and I'm having a hard time understanding how to use this function that is on page 97. Here it is:


    int getint(int...
  24. Thread: stricmp

    by csisz3r
    Replies
    6
    Views
    5,790

    Do you mean strcmp()?

    Do you mean strcmp()?
  25. After that, you should find the area of both...

    After that, you should find the area of both rectangles (the yard and the house) using the formula area = length * width . Then you need to subtract the area of the house from the area of the yard to...
Results 1 to 25 of 29
Page 1 of 2 1 2