Answer Posted / banavathvishnu
#include<stdio.h>
#include<conio.h>
Togglebit(int k,int bit)
{
printf("after %d bit is toggled = %d",bit,(k^(1<<(bit-
1))));
return 1;
}
int main()
{
int i;
int bitno;
printf("enter the number \n");
scanf("%d",&i);
printf("enter the bit number to toggle \n");
scanf("%d",&bitno);
Togglebit(i,bitno);
getch();
return 1;
}
| Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
Explain how can you tell whether two strings are the same?
What is the function of multilevel pointer in c?
What would happen to X in this expression: X += 15; (assuming the value of X is 5)
Is it cc or c in a letter?
while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above
What does 3 periods mean in texting?
What are the types of macro formats?
What are the types of variables in c?
please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com
Explain why can’t constant values be used to define an array’s initial size?
How can I send mail from within a c program?
What is #ifdef ? What is its application?
An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array
What are comments and how do you insert it in a C program?
How can I find the modification date and time of a file?