Search:

Type: Posts; User: peterx

Search: Search took 0.01 seconds.

  1. Thread: pointer

    by peterx
    Replies
    2
    Views
    889

    pointer

    We have two programs. First program is
    whit POINTER and the second program is without the Pointer.
    Both program print out the same result. but why we should use POINTER.




    /*Cube a...
  2. Thread: pointer problem

    by peterx
    Replies
    2
    Views
    959

    pointer problem

    hi!
    I have problem whit pointer.
    The program prints out: 1-2-3-4....9



    #include <stdio.h>
    void inc_count(int *count_ptr)
    {
    int h=(*count_ptr)++;
  3. Thread: pointer problem

    by peterx
    Replies
    3
    Views
    1,240

    pointer problem

    Hi!
    I have problem with POINTER.
    I read two books but I did not understand the pointer.
    I know that the & operator is unary operator that returns the address of its operand.


    int y=5;
    int...
  4. Thread: Pointer

    by peterx
    Replies
    5
    Views
    1,079

    Pointer

    Hi!
    I have a little problem with POINTER.
    when should we use a pointer, and how dose it work?
  5. Thread: c programming

    by peterx
    Replies
    2
    Views
    934

    c programming

    Hi!
    How do these operators work?


    (<<, &, |, ~, ^)
    if we have:
    c1=5;
    c2=6;

    c3=c1 & c2 //?????
  6. Thread: call a function

    by peterx
    Replies
    1
    Views
    820

    call a function

    My program prints out Fibonacci_number(0,1,1,2,3,5). The program is ok.
    My problem:I want to take a number from Fibonacci_number(0,1,1,2,3,5)
    and multiply whit 10. ex: I want to take 3 and multiply...
  7. Replies
    8
    Views
    1,418

    No, is not a homework assignment. I try to...

    No, is not a homework assignment.
    I try to understand this program.



    #include <stdio.h>
    /* Function f(n) returns the n'th Fibonacci number
    * It uses ALGORITHM 2C: NON-RECURSIVE LOOP
    ...
  8. Replies
    8
    Views
    1,418

    a short question

    Hi!

    How dose this code work?
    what dose it mean?
    /* C trick to swap n1 and n2 */

    n1^=n2^=n1^=n2;
  9. Thread: return problem

    by peterx
    Replies
    3
    Views
    999

    Hi! Thank you for your help. peter

    Hi!
    Thank you for your help.
    peter
  10. Thread: return problem

    by peterx
    Replies
    3
    Views
    999

    return problem

    Hi!
    .........................
    if(...)
    .....
    else if(...)
    .......
    else
    return a string.

    after compiling and running the print out is=(AAAAAAAA8.00)
  11. Thread: type conversion

    by peterx
    Replies
    3
    Views
    6,030

    type conversion

    Hi!
    I have problem with type conversion.
    when I compile the program I get this error:
    ( 'count' : redefinition; different basic types ).
    please tell me about type conversion.


    ...
  12. Thread: c_programming

    by peterx
    Replies
    8
    Views
    1,231

    but if I park my car 5.25 hourse. first: ...

    but if I park my car 5.25 hourse.
    first: 5.25-3=2.25
    second: vi pay 0.5$ every houre after 3 hourse. For 2.25 hourse we must pay 3$
    because for 2 hourse we pay 2$ and 0,25 houre we should pay...
  13. Thread: c_programming

    by peterx
    Replies
    8
    Views
    1,231

    SlayerBlade Thank you very much for your help.

    SlayerBlade
    Thank you very much for your help.
  14. Thread: c_programming

    by peterx
    Replies
    8
    Views
    1,231

    A parking charge is 2 dollor for up to three...

    A parking charge is 2 dollor for up to three houres. After 3 houres the charge increase
    0.5$ every houre. and we can not park more than 24 houres.
    My problem: if a person parks his car 5 houres. ...
  15. Thread: c_programming

    by peterx
    Replies
    8
    Views
    1,231

    c_programming

    Hi
    I have a problem whit this code:



    double charge =2; //2$
    double houre;
    if(houre<=3)
    return charge;
  16. Thread: c programming

    by peterx
    Replies
    6
    Views
    1,183

    c programming

    Hi!
    I want to learn C programming.
    I have problem whit print out.
    if I have:




    double value_1;
    int value_2;
Results 1 to 16 of 16