How to add two numbers without using arithmetic operators?

Answer Posted / pugalarasu

int sum(int num1,int num2)
{
for(int i=0;i<num2;i++)
num1++;
return num1;
}

Is This Answer Correct ?    39 Yes 50 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Place the #include statement must be written in the program?

773


Why enum is used in c?

709


What is external variable in c?

818


the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above

1011


What do you mean by c what are the main characteristics of c language?

799


What is header file in c?

837


Explain what is the difference between a string and an array?

898


Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

874


write a program to copy the string using switch case?

2628


What are different types of pointers?

784


What is the difference between array and pointer in c?

816


What is memory leak in c?

848


Write a C++ program to generate 10 integer numbers between - 1000 and 1000, then store the summation of the odd positive numbers in variable call it sum_pos, then find the maximum digit in this variable regardless of its digits length.

1772


What is the purpose of macro in C language?

857


What is a method in c?

821