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
What is a char c?
What are the data types present in c?
When should I declare a function?
What is typedef example?
What are the types of assignment statements?
What is null in c?
can we change the default calling convention in c if yes than how.........?
What’s a signal? Explain what do I use signals for?
a direct address that identifies a location by means of its displacement from a base address or segment a) absolute address b) relative address c) relative mode d) absolute mode
Why string is used in c?
How are portions of a program disabled in demo versions?
How to declare pointer variables?
How can I change the size of the dynamically allocated array?
How do I get an accurate error status return from system on ms-dos?
In which language linux is written?