Search:

Type: Posts; User: patil.vishwa

Search: Search took 0.01 seconds.

  1. Replies
    11
    Views
    9,504

    Could be done this way, somewhat similar to...

    Could be done this way, somewhat similar to scandir routine,




    Declare an array to hold the filenames.

    DIR *dir_p;
    struct dirent *dir_entry_p;
    dir_p = opendir(<dir name>);
  2. Look at this, J =1; if...

    Look at this,




    J =1;

    if ((i=j++)==1)
    printf("If i-%d,j-%d\n",i,j);
    else
  3. Yep, Both looks similar!

    Yep, Both looks similar!
  4. Thanks a lot...!

    Thanks a lot...!
  5. Trouble in positioning myself into OOP way...!

    I've leant (learning) C++ and excited to exercise its concepts n features, but the problem is i'm not able to conceptualize my program totally in OOP way, since i've worked extensively structured...
  6. Replies
    5
    Views
    2,303

    Yes, global variables are initialized to zero...

    Yes, global variables are initialized to zero (even static variabels).
  7. Replies
    8
    Views
    1,769

    You cant expect to print the aString as "boo" in...

    You cant expect to print the aString as "boo" in main & will print only inside changeAString func.

    If you want to do so then declare the variable temp in the global scope, as now it is local to...
  8. Replies
    5
    Views
    2,584

    Thanks for the clarification....!

    Thanks for the clarification....!
  9. Replies
    5
    Views
    2,584

    Malloc for extending the size....!

    {
    char (*a)[100];

    a = malloc (2 * 100);
    a[1] = "Hi ";
    a[2] = "Hello";

    /*need to put more records to a, so go for resize...!*/

    a = malloc (4 * 100);
  10. Replies
    6
    Views
    1,911

    I'd done this already, see it looks as i...

    I'd done this already, see it looks as i mentioned earlier...



    int main()
    {
    int a,b=3;
    a= ( ( b ++ ) * ( b ++ ) * ( b ++ ) );
    printf("&#37;d %d \n",a,b);
  11. Replies
    6
    Views
    1,911

    Your code looks like this after preprocessing. ...

    Your code looks like this after preprocessing.



    int main()
    {
    int a,b=3;
    a =(b++ * b++ * b++); /* CUBE(b++) gets replaced.
    printf("%d %d",a,b);
  12. Replies
    17
    Views
    4,638

    Thanks a lot for the detailed explanation....!

    Thanks a lot for the detailed explanation....!
  13. Replies
    17
    Views
    4,638

    i've seen it nw and understood that it wont fail...

    i've seen it nw and understood that it wont fail as you mentioned rather could make the maintenance difficult.
  14. Replies
    17
    Views
    4,638

    Hi Elysia,

    Could you tell in detail for not to cast the malloc result.
    I feel we should, since the malloc returns void pointer.
    I've been doing this and it works well with C...!
  15. Replies
    17
    Views
    4,638

    Malloc should be used in global scope...!

    Yes, as matp and others said malloc should not be used in global scope.
    I've re-arranged your code to make it work...!


    ...
    #define SIZE_MAX 100

    typedef struct stack
    {
    char...
Results 1 to 15 of 17