Search:

Type: Posts; User: dude543

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    1,959

    char foo='f'; char *pc; char **ppc; ...

    char foo='f';
    char *pc;
    char **ppc;

    pc=&foo;
    ppc=&pc;

    printf("pc -> %p\n",pc);
    printf("&pc -> %p\n",&pc);
    printf("ppc -> %p\n",ppc);
  2. Replies
    7
    Views
    2,410

    This expersion will alway be true !!! if(...

    This expersion will alway be true !!!


    if( b[j+acount]!='!'||b[j+acount]!='\0')


    lets test with j = 0 and acount = 0, then we get to test


    if ( b[0] != '!' || b[0] != '\0' )
  3. Replies
    2
    Views
    952

    Want to be sure.

    How hard is it to implent bubble sort on
    a single linked list ?

    By hard I mean, that we will have to write diffrent
    code for each private case. Like if the list contains
    only two juctions and...
  4. Replies
    11
    Views
    5,810

    So we must always test pointers against NULL ? ...

    So we must always test pointers against NULL ?


    char buf[] = "abc";
    char *p;

    p = strchr(buf, 'z');

    /* This is wrong ? */
    if ( ! p )
  5. No. Just reverse the list. ( not the data, but...

    No. Just reverse the list. ( not the data, but the pointers)
  6. Thread: Help

    by dude543
    Replies
    12
    Views
    1,599

    In the function "distance" replace dist =...

    In the function "distance" replace


    dist = grid[x][y];


    with


    dist = grid[x-1][y-1];
  7. Replies
    5
    Views
    1,405

    core file is the process image at time of...

    core file is the process image at time of recvinig the signal
    seg fault.
    Its very easy to look at the debuger manuall and learn how to work with
    core files.
  8. But anyway , using calloc , the space is...

    But anyway , using calloc , the space is initializied to zero.

    to loop the array :


    int i;

    for( i = 0; i < db->ncountries; i++ )
    db->list[i] = NULL;
    /* or
  9. Replies
    5
    Views
    1,405

    You must learn to work with core files. core...

    You must learn to work with core files.
    core file is the process image at time of recvinig the signal
    seg fault.
  10. Thread: what is macro

    by dude543
    Replies
    8
    Views
    2,373

    Hellow !!! this is a c forum not c++.

    Hellow !!! this is a c forum not c++.
  11. Replies
    4
    Views
    4,325

    I only looked at the beging of the program. ...

    I only looked at the beging of the program.

    Look throw the code, looking for the word "Error".



    #include <stdlib.h>
    #include <stdio.h>
    #include <math.h>
    #include <limits.h>
  12. Replies
    15
    Views
    9,543

    For every address returned by malloc : In order...

    For every address returned by malloc :
    In order to free memory use the function free().

    like


    char *p;

    if ( ! ( p = malloc(20)) )
    {
  13. > Newbie needing help -- I am writing a program...

    > Newbie needing help -- I am writing a program to implement sorting alogrithms and think what I have is correct (feel free to double check me!). Where I am have problems is as part of the assignment...
  14. Thanks Dave_Sinkula. Now I can see it. > How can...

    Thanks Dave_Sinkula. Now I can see it.
    > How can i sort strings using insertion sort?Is it possible?Coz i only understand this simply sort and im running out of time now...pls help..thanks

    You...
  15. For the link >...

    For the link
    > http://cboard.cprogramming.com/showthread.php?t=78605

    why do I get :
    "dude543, you do not have permission to access this page." ?

    The easiset way is using qsort.
  16. Replies
    9
    Views
    2,272

    What is the exe you trying to run ?

    What is the exe you trying to run ?
  17. Replies
    24
    Views
    4,168

    Scan the string. Loop throw it until you find...

    Scan the string.
    Loop throw it until you find '\n' or '\0' and overwrite with '\0'.
  18. Thread: strtok reset

    by dude543
    Replies
    3
    Views
    18,266

    Bare in mind, the seconed argument to strtok will...

    Bare in mind, the seconed argument to strtok will be replaced
    by NULL's.
    The best thing to do is keep abuffer with the orignal string
    in it.
  19. Replies
    5
    Views
    2,377

    I read some of your code.

    So . as told earlier. Function prototypes should be posted
    in the beging of the file.
    You don't need to prototype library functions like malloc, and
    you might get errors from doing it. Use...
  20. Replies
    12
    Views
    3,533

    Sorry but I get : 1 8 10 11 12 ...

    Sorry but I get :
    1 8 10 11 12




    You already have the ascending, does'nt it give any idea
    how to do the descending ?
    Hint : try to follow the same logic.
  21. Replies
    8
    Views
    2,087

    num shold'nt be set to EOF !!!! The return value...

    num shold'nt be set to EOF !!!!
    The return value from scanf , should.

    Also, close all streams you opened.
    This the basic code :


    extern int errno;
  22. Replies
    12
    Views
    3,533

    I would suggest somting simpler int n =...

    I would suggest somting simpler



    int n = sizeof(arr)/sizeof(arr[0]);
    int i, strt, j;


    i = 0;
    while ( i < n - 1)
  23. Replies
    5
    Views
    3,146

    im finding that kernhigan and ritchie is...

    [QUOTE]
    im finding that kernhigan and ritchie is not very good for me
    [\QUOTE]
    I must agree with you. Try to find some beginer book.
  24. Replies
    3
    Views
    1,042

    Just fix the function main. Go by the comments ...

    Just fix the function main. Go by the comments



    int main(void)
    {

    /* Dont need head */
    list_pointer *head;
    /* Not just "Node" but "struct Node" */
  25. Replies
    4
    Views
    3,130

    Is this the "X files" ? first of all, main...

    Is this the "X files" ?

    first of all, main should look like this


    int main(void)
    {
    int result;
Results 1 to 25 of 98
Page 1 of 4 1 2 3 4