How to swap the following two hexadecimal numbers in c language? Eg:
input :0xabcd
output:0xcdab
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use something along the lines of:
This swaps the two bytes around, giving you an output of
cdab.