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 difference between far and near pointers?

604


What is c language and why we use it?

613


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

625


What is the use of parallelize in spark?

570


What is the difference between text and binary i/o?

586






Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?

3048


Explain what is the benefit of using an enum rather than a #define constant?

714


In C language, the variables NAME, name, and Name are all the same. TRUE or FALSE?

760


Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon

1730


Why can't I perform arithmetic on a void* pointer?

634


Why do we use & in c?

583


What is hashing in c?

638


Is there any possibility to create customized header file with c programming language?

619


What 'lex' does?

712


What is the code for 3 questions and answer check in VisualBasic.Net?

1682