Answer Posted / 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 |
Post New Answer View All Answers
If the size of int data type is two bytes, what is the range of signed int data type?
What is the use of printf() and scanf() functions?
Write a program to reverse a given number in c?
Why is structure important for a child?
Explain how can I write functions that take a variable number of arguments?
When reallocating memory if any other pointers point into the same piece of memory do you have to readjust these other pointers or do they get readjusted automatically?
What is the use of #define preprocessor in c?
To print the pattern 1 2 3 4 5 10 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9
What is the use of linkage in c language?
Can you assign a different address to an array tag?
Explain what is the difference between the expression '++a' and 'a++'?
What is function and its example?
What are the 3 types of structures?
Explain what are header files and explain what are its uses in c programming?
Is it fine to write void main () or main () in c?