Answer Posted / sibnath halder
Assuming that you want to use 8 bits of whatever bytes you
have, you could use
char swapbyte(unsigned char c)
{ unsigned char result=0;
for(int i=0;i<8;++i)
{ result=result<<1;
result|=(c&1);
c=c>>1;
}
return result;
}
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How many bytes is a struct in c?
What is indirection? How many levels of pointers can you have?
What are the different types of endless loops?
Why structure is used in c?
Explain what is page thrashing?
How to explain the final year project as a fresher please answer with sample project
What is getch() function?
What does a function declared as pascal do differently?
#include
write a program to display all prime numbers
What happens if header file is included twice?
What is the explanation for cyclic nature of data types in c?
When can a far pointer be used?
How can I make it pause before closing the program output window?
What are the standard predefined macros?