Given any number say 12, find the next multiple of 8 eg 16 using bit-wise manipulations.?
Click for Solution

  • Warning: Illegal string offset 'name' in /home/prepdo6/gpl4you/discussquessub.php on line 681
    A i think a better solution would be...
    [code]
    int nextMul(int input)
    {
    input=(input>>3); //eliminating last 3 bits
    input ^= (input


  • Warning: Illegal string offset 'name' in /home/prepdo6/gpl4you/discussquessub.php on line 681
    A thanks a lot gplasset to help me for finding the appropriate content i was looking for!!!!!!!!!!!


  • Warning: Illegal string offset 'name' in /home/prepdo6/gpl4you/discussquessub.php on line 664

  • Warning: Illegal string offset 'name' in /home/prepdo6/gpl4you/discussquessub.php on line 682
    A the correct solution would b:
    int nextmultiple(int num)
    { int mask=8;
    num

[Insert Code]