Select chapter



functions (3.papers)
loops (1.papers)
arrays (2.papers)
structures (3.papers)
unions (1.papers)
pointers (7.papers)
null pointers (1.papers)
strings (2.papers)
misc c concepts (1.papers)
Data structures (5.papers)
linked lists (3.papers)
trees (1.papers)
basics (5.papers)
Hide

Sponsored Links


  

c interview questions and answers

Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
Show Answer
Share Facebook gmail Twitter
10
What is below c code doing?

int myreversefunc(int num)
{
    int byte0, byte1, byte2, byte3;
    byte0 = (num & x000000FF) >>  0 ;
    byte1 = (num & x0000FF00) >>  8 ;
    byte2 = (num & x00FF0000) >> 16 ;
    byte3 = (num & xFF000000) >> 24 ;
    return((byte0 << 24) | (byte1 << 16) | (byte2 << 8) | (byte3 << 0));
}
  1. The given function will convert big endian to little endian
  2. The given function will convert little endian to big endian & big endian to little endian.
  3. The given function will convert little endian to big endian
  4. none
Show Answer
Share Facebook gmail Twitter
Read more papers :