Reverse the bit order in a single macro.
eg. i/p = 10010101 --> o/p = 10101001

Answer Posted / balaji ganesh

#include<stdio.h>
#define f(a) strrev(a)
main()
{
char c[20];
scanf("%s",c,printf("enter bit string;"));
printf("%s",f(c));
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of volatile?

611


What is the difference between memcpy and memmove?

606


write a c program in such a way that if we enter the today date the output should be next day's date.

1684


Whats s or c mean?

594


What are the types of pointers in c?

531






What is the use of printf() and scanf() functions?

636


What functions are used in dynamic memory allocation in c?

598


What is scope of variable in c?

572


What is structure padding in c?

629


What does *p++ do? What does it point to?

617


Write a program to print “hello world” without using semicolon?

675


any "C" function by default returns an a) int value b) float value c) char value d) a & b

668


What is use of #include in c?

601


write a program in c language to print your bio-data on the screen by using functions.

6252


When should the const modifier be used?

660