Search:

Type: Posts; User: c.user

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    26
    Views
    5,379

    laserlight, you recommend to make another...

    laserlight, you recommend to make another function for the sort and leave the simple comparator (if I want to leave NULLs at their places) ?
    If I move qsort from the sorting it is become available...
  2. Replies
    26
    Views
    5,379

    when he has 1000000 elements he deletes 500000th...

    when he has 1000000 elements he deletes 500000th element it needs to move 500000 elements to the left
    and if he uses pointers it is easier to delete them by assigning NULL to 500000th
    when it has...
  3. Replies
    26
    Views
    5,379

    My comparator doesn't need new function which...

    My comparator doesn't need new function which will move this NULLs to the end of the array before the sorting
    And it is possible to realise such that it will save their places without moving to the...
  4. Replies
    26
    Views
    5,379

    laserlight, person *personer[10]; this is...

    laserlight,


    person *personer[10];

    this is his declaration of the array of pointers to the structures
    if he wants to delete structure from the array when it filled, he frees the pointer and...
  5. Replies
    26
    Views
    5,379

    I am recommend to control the program, and you...

    I am recommend to control the program, and you are recommend to debug the program
    if it will be turned off what will happen if there will an incorrect data in that array ?
  6. Replies
    26
    Views
    5,379

    char nullflag; ... int critter_cmp_namn...

    char nullflag;

    ...

    int critter_cmp_namn (person **p1, person **p2)
    {
    if (!p1 || !p2 || !*p1 || !*p2)
    return nullflag = 1;
    return strcmp ((*p1)->fnamn, (*p2)->fnamn);
    }
  7. Replies
    26
    Views
    5,379

    I tryed to leave the NULL in it's place (so now I...

    I tryed to leave the NULL in it's place (so now I see that the sorting will not correct though, hence it should return 1 for NULL and it is necessary to make something like errno (but local in the...
  8. Replies
    26
    Views
    5,379

    I will correct my function a bit int...

    I will correct my function a bit


    int critter_cmp_namn (person **p1, person **p2)
    {
    if (!p1 || !p2 || !*p1 || !*p2)
    return 0;
    return strcmp ((*p1)->fnamn, (*p2)->fnamn);
    }
  9. >>> base = [ "one", "two" ]; >>> base *= 2; >>>...

    >>> base = [ "one", "two" ];
    >>> base *= 2;
    >>> base;
    ['one', 'two', 'one', 'two']
    >>> list = [ base, base ];
    >>> list;
    [['one', 'two', 'one', 'two'], ['one', 'two', 'one', 'two']]
    >>> del...
  10. Replies
    6
    Views
    10,639

    Jaggid1x, -> - is special operation for this...

    Jaggid1x,
    -> - is special operation for this
    the difference is


    (*first).name
  11. Replies
    26
    Views
    5,379

    person *personer[10]; qsort...

    person *personer[10];




    qsort (*personer, fillen, sizeof (person), critter_cmp_namn);
  12. how would you realize this >>> base = [...

    how would you realize this


    >>> base = [ "one", "two" ];
    >>> list = [ base ];
    >>> list.append(base);
    >>> list.append(base);
    >>> list.append(base);
    >>> list
    [['one', 'two'], ['one', 'two'],...
  13. Replies
    4
    Views
    1,564

    struct ship_tank A[20]; int i; for (i...

    struct ship_tank A[20];
    int i;

    for (i = 1;i <= n; i++) {
    printf("Enter the numbers of tanks: ");
    scanf("%d", &i);
    ...
    }
  14. Replies
    6
    Views
    10,639

    (*first).name change it to ...

    (*first).name


    change it to



    first->name
  15. Replies
    14
    Views
    4,637

    #include main() { char *line =...

    #include <stdio.h>

    main()
    {
    char *line = "term1= the cat &term2= M ";
    char one[100], two[100];

    if (sscanf(
    line,
    "%*[^=]="
  16. Thread: How to do this

    by c.user
    Replies
    32
    Views
    4,127

    #include main() { ...

    #include <stdio.h>

    main()
    {
    printf("one");

    char *p = "two";

    printf("%s %s %s\n", p-4, p, p+4);
    return 0;
  17. Thread: How to do this

    by c.user
    Replies
    32
    Views
    4,127

    BEN10, char *p="hello"; you know, all...

    BEN10,


    char *p="hello";

    you know, all strings write to read-only memory, all strings like printf("one two three\n"); - "one two three\n" literal constant it goes to read-only memory and...
  18. Replies
    11
    Views
    4,177

    function for deleting any character

    function for deleting any character
  19. Replies
    19
    Views
    2,880

    download it, then save_data.zip.txt =>...

    download it, then save_data.zip.txt => save_data.zip, then open (there is no zip or tar extension here for the attach)
  20. #include main() { unsigned...

    #include <stdio.h>

    main()
    {
    unsigned char line1[100];
    signed char line2[100];
    char line3[100];

    fgets(line1, sizeof line1, stdin);
    fgets(line2, sizeof line2, stdin);
  21. I got one segmentation fault when I use int type...

    I got one segmentation fault when I use int type for the array where fgets save
    but when I changed it to signed char, it's ok




    #include <stdio.h>
    #include <ctype.h>

    main()
  22. How can you write it for the one char from...

    How can you write it for the one char from dollar[0] ?
    It must return that non-digit is a digit (error like)
  23. you think function can show a digit on a...

    you think function can show a digit on a non-digit character ? if this range sticked (maybe it can change for the codes, but they will be greater than zero) isdigit will know only the digits, and for...
  24. but it should be casted while the pass to isdigit...

    but it should be casted while the pass to isdigit (prototype rule) and then C99 7.4.1 undefined behavior

    it has greater than zero code in ASCII, so any symbol of 7-bit ASCII should not casted hence
  25. yea, I know, but I never seen this cast in the...

    yea, I know, but I never seen this cast in the books

    you think isdigit('0') should be incorrect ? '0' will be signed

    by the topic
    immie86, i cleared your function (don't know how it's work and...
Results 1 to 25 of 117
Page 1 of 5 1 2 3 4