Search:

Type: Posts; User: jedi_jinn

Search: Search took 0.00 seconds.

  1. Replies
    4
    Views
    2,408

    Shift operators in C

    I was wondering why the following code returns the smallest integer?


    int x;
    for(x=1; x>0; x<<=1);
    printf("%d",x);



    thanks.
  2. Replies
    7
    Views
    2,213

    Oh thanks for the responses

    Do you know where I can find information on format descriptors like %d, %g, %e, %f?
  3. Replies
    7
    Views
    2,213

    Help with pow()

    #include <stdio.h>
    #include <math.h>

    int main()
    {
    int base, exp;
    scanf("%d", &base) ;
    scanf("%d", &exp) ;
    printf("%d ^ %d = %d\n", base, exp, pow(base,exp)) ; ...
Results 1 to 3 of 3