write a program to add two numbers without using an arithmetic
operator.



write a program to add two numbers without using an arithmetic operator...

Answer / mogankumar pc

#include<stdio.h>
#include<conio.h>
int main()
{
int first,second;
printf("enter the two numbers");
scanf("%d%d",&first,&second);
first+= second;
printf("RESULT:%d",first);
getch();
return 0;
}
//+= is not arithmetic operator; its assignment operator

Is This Answer Correct ?    3 Yes 2 No

Post New Answer

More C++ General Interview Questions

Can char be a number c++?

0 Answers  


Discuss the effects occur, after an exception thrown by a member function is unspecified by an exception specification?

0 Answers  


What are the advantages of C++ programming compared to C programming?

2 Answers   HAL,


Is c++ free?

0 Answers  


What is a linked list in c++?

0 Answers  






what is software cycle? What is a mission critical system ? What is the important aspect of a real-time system ? Explain the difference between microkernel and macro kernel. Give an example of microkernel.Why paging is used ? Which is the best page replacement algo and Why ? What is software life cycle ? How much time is spent usually in each phases and why Which one do U want to work if selected in Honeywell ? Which are the different types of testing ? What is a distributed system ? Some questions about CSP. Which languages do U know ? What are the differences between Pascal and C. questions from Compiler construction and Lisp. Which are the different computer architecture? What is the requirement in MIMD ? What is the difference between RISC and CISC processors ? Difference between loosely coupled and tightly coupled systems ? What is an open system?

0 Answers   Honeywell,


Can we define a constructor as virtual in c++?

0 Answers  


Is overriding possible in c++?

0 Answers  


What is the difference between the functions rand(), random(), srand() and randomize()?

0 Answers  


What do you mean by abstraction. Explain your answer?

5 Answers  


You run a shell on unix system. How would you tell which shell are you running?

0 Answers  


1.Between 100 and 999 are some numbers that have the characteristics that if you cube the individual digits and sum together you will get the same number. 2. A program that can accept as input an integer and output the equivalent of that number in words.

3 Answers  


Categories