how to add numbers without using arithmetic operators.

Answer Posted / abdur rab

#include <stdio.h>

int main ( int argc, char* argv [ ] )
{
int value1 = 10;
int value2 = 5;
printf ( "\n The sum is :%d", value1 | value2 );
}

Is This Answer Correct ?    10 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between typedef struct and struct?

605


Why is c platform dependent?

629


What are void pointers in c?

580


How many bytes are occupied by near, far and huge pointers (dos)?

681


What is meant by realloc()?

685






Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10

15064


What is the purpose of main() function?

665


write an interactive C program that will encode or decode a line of text.To encode a line of text,proceed as follows. 1.convert each character,including blank spaces,to its ASCII equivalent. 2.Generate a positive random integer.add this integer to the ASCII equivalent of each character.The same random integer will be used for the entire line of text. 3.Suppose that N1 represents the lowest permissible value in the ASCII code,and N2 represents the highest permissible value.If the number obtained in step 2 above(i.e.,the original ASCII equivalent plus the random integer)exceeds N2,then subtract the largest possible multiple of N2 from this number,and add the remainder to N1.Hence the encoded number will always fall between N1 and N2,and will therefore always represent some ASCII character. 4.Dislay the characters that correspond to the encoded ASCII values.  The procedure is reversed when decoding a line of text.Be certain,however,that the same random number is used in decodingas was used in encoding.

2732


write a program fibonacci series and palindrome program in c

636


What could possibly be the problem if a valid function name such as tolower() is being reported by the C compiler as undefined?

758


What does malloc () calloc () realloc () free () do?

569


Differentiate call by value and call by reference?

574


Explain how do you print an address?

668


What is the difference between declaring a variable and defining a variable?

729


What is the sizeof () a pointer?

558