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
please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com
Explain what is the concatenation operator?
Why isnt any of this standardized in c?
Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent
how to write a c program to print list of fruits in alpabetical order?
What are the parts of c program?
List the difference between a 'copy constructor' and a 'assignment operator' in C?
What is a const pointer?
How do I determine whether a character is numeric, alphabetic, and so on?
What is substring in c?
#include main() { enum _tag{ left=10, right, front=100, back}; printf("left is %d, right is %d, front is %d, back is %d",left,right,front,back); }
Why do we use int main instead of void main in c?
How will you divide two numbers in a MACRO?
What does stand for?
Is array a primitive data type in c?