Answered Questions

  • Write the equivalent expression for x%8?

    x&7 Write expressions to swap two integers without using a temporary variable?

    som thomas

    • Oct 14th, 2007

    U can try dis float y; int z; while(x>8) {   y=x/8; //y will  also have decimal values   z=x/8; //z will only have integer values   y=y-z;// y will have only decimal parts  z=y*8;// we will have reminder value stored in z } printf("reminder %d",z);

    Sandeep Sutar

    • Aug 19th, 2007

    Just x%8 means the last 3 bits of the integer i.e if x= 1100 1101  in binary the x%8 = 101 in binary. So any algo or step will go this.for example: =(x-(x>>3)*8) in x>>3 los...