answersLogoWhite

0


Best Answer

You can make use of pointers to achieve this.

void add( int *a, int *b){

(*a) += (*b);

}


Now if two numbers a and b are given and you need to store the value in variable c, then you would perform:


c = a;

add(&c,&b);


User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

sum = x-(-y);

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a c program to add 2 no without using plus operator?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How can you download c compiler?

write a c program to fine largest/smallest of 3no (using ?:ternary operator/conditional operator)


How do you write find out the power of a number without using operator and predefined functions?

With repeated multiplication.


Write a program to divide 2 numbers without using the division operator?

int divide1(int a,int b) { int t=1; while(b*t<=a) { t++; } return t-1; }


Write c program to print palindrome using string without using strrev strlen strcam?

sdfdg


Can you write a program without using any semicolon inside the main function?

not possible dude


Is it possible to write a C program without using preprocesser directives?

Technically yes, practically no.


Write a Program to convert decimal number into hexadecimal no without using function and string?

This is not a question.


How do you write a program in C plus plus plus plus How do you write a program in C to swap two variables without using the third oneo swap two variables without using the third one?

To swap two variables without using a third variable, use exclusive or manipulation... a ^= b; b ^= a; a ^= b;


How do you write a c program to find biggest among two numbers using conditional operator?

int max (int a, int b) { return a>b?a:b; }


How do you write a program in C to swap two variables without using the third one using XOR?

a=a^b; b=a^b; a=a^b;


How do you define power function without using operator?

using pow() function.. ..


How a program in c that will add 2 numbers without using any operator?

Not possible. Let's not forget than in C the followings are all operators:+, -+=, -=++, --=&, *, []function-call