how to set Nth bit of a variable?
Answer / kirankumaryakkala
ex: int res=16, temp=1,n;
printf("enter the Nth bit no");
scanf("%d",&n);
temp=temp<<n; //leftshift to ntimes
res=res|temp; //bitwise OR
printf("setted nth bit of res %d",res);
| Is This Answer Correct ? | 9 Yes | 4 No |
What does return 1 means in c?
What are header files and explain what are its uses in c programming?
What is property type c?
What is struct node in c?
What is c mainly used for?
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
how to print 212 as Twohundreds twelve plz provide me ans soon
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
There are 3 baskets of fruits with worng lables,one basket has apple,another basket has orange,another has combination of apple and orange,what is the least way of interchange the lables.
15 Answers Cisco, Google, MBT,
What is huge pointer in c?
Write a program to print this triangle: * ** * **** * ****** * ******** * ********** Don't use printf statements;use two nested loops instead. you will have to use braces around the body of the outer loop if it contains multiple statements.
write an algorithm which can find the largest number among the given list using binary search ............... this was asked in the interview
2 Answers Satyam, UNIS, Wipro,