RTOS, Linux Kernel internal, OS-Programming C & Data Structures, Debugging, Optimizations, Makefiles and Wireless Technologies (Wi-Fi ,LTE and LTE-Advanced )
Search This Blog
Sunday, October 5, 2014
WAP to swap two nibbles in a given number
1: main()
2: {
3: unsigned int num = 0xfc;
4: num = (num>>4 & 0x0f) | (num<<4 & 0xf0);
5: printf("Result = 0x%x\n",num);
6: }
No comments:
Post a Comment