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
What do you know about the use of bit field?
Is c easier than java?
How can you allocate arrays or structures bigger than 64K?
Explain the use of 'auto' keyword in c programming?
can any one provide me the notes of data structure for ignou cs-62 paper
How can I run c program?
Why c is called top down?
What is the difference between text files and binary files?
Write the syntax and purpose of a switch statement in C.
What is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?
What does %c mean in c?
What are the 3 types of structures?
What is the scope of global variable in c?
What is the difference between null pointer and wild pointer?
How variables are declared in c?