Search:

Type: Posts; User: pizzas

Search: Search took 0.01 seconds.

  1. Thread: Pointer problem

    by pizzas
    Replies
    17
    Views
    2,120

    I know that!!

    >In any statement, do not change a value within the statement if that value is referenced more than once in the statement. The processing/result of the statement is undefined, therefore it doesn't...
  2. Thread: Pointer problem

    by pizzas
    Replies
    17
    Views
    2,120

    There is always a "but" ..!

    >It should not matter. As long as you don't change the values while printing, right or left will give you the same answer.

    Yeah, it should not matter only if i don't change the values ( like...
  3. Thread: Pointer problem

    by pizzas
    Replies
    17
    Views
    2,120

    2 last questions

    I don't know if i understand it not.. ( but for some reson i think i did..)

    The link you posted, Salem, previously, says only about ++ and not about +=. But ok.

    I tried your piece of code, and...
  4. Replies
    12
    Views
    5,900

    2 questions

    Hey, Prelude, you said fflush(stdout);
    What that means/does ?

    Also in your if statement, the return value of scanf is 2?

    Thx - Polor
  5. Thread: Pointer problem

    by pizzas
    Replies
    17
    Views
    2,120

    ++ is out of point. The problem is:

    I am afraid that noone ( ecxept WaltP i think ) has understood the problem.

    ---------->>
    I know that i add 1 to p and that the new value is not known in advance, it is "random". I know that it...
  6. Thread: Pointer problem

    by pizzas
    Replies
    17
    Views
    2,120

    Only this?????

    Is that the only thing you have to say, for all of my above questions????

    >printf("%d %d %d %d",p,++p,p++,++p);
    i understand why it is undefined, but i don't use x++ and ++x, I use x+=1.

    Hey...
  7. Thread: Pointer problem

    by pizzas
    Replies
    17
    Views
    2,120

    I need more help!

    Well, your example says about x++ and ++x, not about x+=1. x+=1 doesn't have the same problem as with ++, as my teacher tells me, so why to have this problem with my code?

    >But that is only in...
  8. Thread: Pointer problem

    by pizzas
    Replies
    17
    Views
    2,120

    I don't completey understand it...

    I know that anything might happen to the values, but the problem is the way it prints the values. My tutor didn't told us this example. He told us that if you write somewhere p+=1, *p might get any...
  9. Thread: Pointer problem

    by pizzas
    Replies
    17
    Views
    2,120

    Pointer problem

    We just got in pointers in my class, and i am facing some difficulties in understanding them.

    Here's the code with the problem:


    #include <stdio.h>

    main()
    {
    int *p;
  10. Thread: strcat - strcpy

    by pizzas
    Replies
    4
    Views
    4,330

    Thanks!

    Ok, thanks! I got it now! :)
    - Polor
  11. Thread: strcat - strcpy

    by pizzas
    Replies
    4
    Views
    4,330

    ok, but...

    ok, but what about my other 2 questions?
    and what does zero-length string mean?

    Thx - Polor
  12. Thread: strcat - strcpy

    by pizzas
    Replies
    4
    Views
    4,330

    strcat - strcpy

    Why this code doesn't work?
    <code>
    char string[10];

    strcat( string, "hello" );
    puts ( string );
    </code>

    and why when i write
    <code>
Results 1 to 12 of 12