How to add two numbers without using arithmetic operators?
Answer Posted / selloorhari
Hi Nitish,
If we will do the LOGICAL OR function then we will get
either 1 or 0.
If we will do the BITWISE OR then we will get the largest of
the two..
For
ex:
Let us take, First number as 2 and Second number as 3..
Then as per the first case we will get 1 as the output.
10(2) || 11(3) -> 1(1)
As per the second case the output will be 3..
10(2) | 11(3) -> 11(3).
Ok
| Is This Answer Correct ? | 14 Yes | 12 No |
Post New Answer View All Answers
how many key words availabel in c a) 28 b) 31 c) 32
a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
Describe the steps to insert data into a singly linked list.
What is a keyword?
Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?
What is pointer and structure in c?
What are header files? What are their uses?
write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.
What are types of preprocessor in c?
i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none
What are called c variables?
Why is c not oop?
What is wrong with this statement? Myname = 'robin';
What is static identifier?