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 is the output for the code*/ void main() { int r; r=printf("naveen"); r=printf(); printf("%d",r); getch(); }
Which of the following data structures is on average the fastest for retrieving data: 1) Binary Tree 2) Hash Table 3) Stack
What is the difference between void main() and void main (void) give example programme?
Describe for loop and write a c program to sum the series X + x2/2! + x3 /3! + …….. up to fifteen terms.
write a program for size of a data type without using sizeof() operator?
22 Answers HCL, IBM,
explain what are actual arguments?
2. Write a function called hms_to_secs() that takes three int values—for hours, minutes, and seconds—as arguments, and returns the equivalent time in seconds.. Create a program that exercises this function by repeatedly obtaining a time value in hours, minutes, and seconds from the user (format 12:59:59), calling the function, and displaying the value of seconds it returns.
What is the OOPs concept?
if the total selling price of 15 items and the total profit earned on them is input through the keyboard, write a program to find the cost price of one of the item
What is the difference between text and binary modes?
What is union in c?
HOW DO YOU HANDLE EXCEPTIONS IN C?