Search:

Type: Posts; User: guy_in_2000

Search: Search took 0.04 seconds.

  1. Replies
    6
    Views
    4,402

    Hi, Though I am not very sure of this, I...

    Hi,

    Though I am not very sure of this, I think the use of "void" allows certain old C compilers to handle functions that do not take any arguments. For the new ones this is redundant.
  2. Thread: user input

    by guy_in_2000
    Replies
    16
    Views
    3,324

    Is using scanf in this way dangerous? I mean will...

    Is using scanf in this way dangerous? I mean will it lead to some buffer overflow or somethin' like that?
  3. Replies
    6
    Views
    1,396

    Hi, I think writing/using a small...

    Hi,

    I think writing/using a small command-line parser would be of immense help. Coding in Lex & Yacc should get your job done in not much time. If you wish to write your own parsing code though,...
  4. Replies
    8
    Views
    38,018

    Right, but if the programmer wishes to have...

    Right, but if the programmer wishes to have multiple copies of this struct then one has to have a malloc().
  5. Replies
    8
    Views
    38,018

    Hi, Your code should look like this: ...

    Hi,

    Your code should look like this:



    typedef struct {
    char name[20];
    int age;
    } Info;
  6. Replies
    5
    Views
    1,651

    printf("%s\n", str1); will print hello unless...

    printf("%s\n", str1);
    will print hello unless you pass str1 as a parameter to "insertstring()".

    insertstring(str1, "there", 3);
    Moreover, str1 should be created with enough space to...
  7. Replies
    5
    Views
    1,087

    If you are using *nix or its clones, "vi" might...

    If you are using *nix or its clones, "vi" might be editor you need. On the other hand, if you are using DOS/Win you can use Borland's IDE.
  8. Replies
    4
    Views
    1,729

    Hello all, The big-wigs should excuse this...

    Hello all,


    The big-wigs should excuse this ignorant soul, I thought one couldn't pass structures like this

    void SomeFn( struct { int a;} b ) { //code }

    I think I also made another...
  9. Replies
    4
    Views
    1,729

    Hello, For problem 1, You declared a...

    Hello,

    For problem 1,

    You declared a function pointer cmp like this

    int (*cmp)()

    which means that this function takes no arguments and just returns an int. What you should be doing...
Results 1 to 9 of 9