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 are the rules for identifiers in c?
C language questions for civil engineering
What are the modifiers available in c programming language?
What is getch() function?
Describe the modifier in c?
Suppose we have a table name EMP as below. We want to perform a operation in which, I want to change name ‘SMITH’ from as ‘SMITH JAIN’. Also I want to change the name of the column from ENAME to E_NAME. EMPNO ENAME JOB MGR HIREDATE SAL 7369 SMITH Coder 7902 17-DEC-80 800 7499 ALLEN SALESMAN 7698 20-FEB-81 1600 7521 WARD SALESMAN 7698 22-FEB-81 1250
What is the use of a ‘ ’ character?
What is meant by type specifiers?
Define macros.
What is the hardest programming language?
What is the use of a conditional inclusion statement in C?
How do you construct an increment statement or decrement statement in C?
Why clrscr is used after variable declaration?
What is void main ()?
What is keyword in c?