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 programme to enter some number and find which number is maximum and which number is minimum from enterd numbers.
What is malloc calloc and realloc in c?
What is advantage of pointer in c?
Can we declare variable anywhere in c?
Where can I get an ansi-compatible lint?
How can a program be made to print the name of a source file where an error occurs?
Given a number N, product(N) is the product of the digits of N. We can then form a sequence N, product(N), product(product(N))… For example, using 99, we get the sequence 99, 99 = 81, 81 = 8. Input Format: A single integer N Output Format: A single integer which is the number of steps after which a single digit number occurs in the sequence. Sample Test Cases: Input #00: 99 Output #00: 2 Explanation: Step - 1 : 9 * 9 = 81 Step - 2 : 8 * 1 = 8 There are 2 steps to get to this single digit number. Input #01: 1137638147
what is real time system?what is the differance between hard and soft real time systems
can we declare a function in side the structure?
Efficient data structure for store/search list of 1000 records a)array b)double linked list c)circular queue d)hash table
Why doesn't the code "a[i] = i++;" work?
Can you think of a way when a program crashed before reaching main? If yes how?