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 |
write a progrmm in c language take user interface generate table using for loop?
What is sizeof return in c?
what are two categories of clint-server application development ?
What is a stream water?
out put of printf(ā%dā,printf(ram));
Who developed c language?
What is a shell structure examples?
What are header files why are they important?
write a recursive program in'c'to find whether a given five digit number is a palindrome or not
What is the benefit of using #define to declare a constant?
main() { printf(5+"Vidyarthi Computers"); }
1)what is the error in the following stmt where str is a char array and the stmt is supposed to traverse through the whole character string str? for(i=0;str[i];i++) a)There is no error. b)There shud be no ; after the stmt. c)The cond shud be str[i]!='\0' d)The cond shud be str[i]!=NULL e)i shud be initialized to 1