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
Write a Program to accept different goods with the number, price and date of purchase and display them
How many bytes are occupied by near, far and huge pointers (dos)?
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.
What is the use of typedef in structure in c?
Write a factorial program using C.
A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?
how to find binary of number?
What do you mean by dynamic memory allocation in c?
Can the curly brackets { } be used to enclose a single line of code?
Explain how can I manipulate strings of multibyte characters?
How many keywords are there in c?
hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm
What are the main characteristics of c language describe the structure of ac program?
Write a program of advanced Fibonacci series.
What is a class c rental property?