how to get the sum of two integers?

Answers were Sorted based on User's Feedback



how to get the sum of two integers?..

Answer / lucky varshney

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int i,j,sum;
printf("enter two numbers");
scanf("%d%d",&i,&j);
sum=i+j;
printf("sum=%d",sum);
}

Is This Answer Correct ?    4 Yes 0 No

how to get the sum of two integers?..

Answer / sandeep gupta

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int i,j,sum;
printf("enter two numbers");
scanf("%d%d",&i,&j);
sum=i+j;
printf("sum=%d",sum);
getch();
}
getch is missed which hold the output result on the screen.that's why i add the GETCH in this program.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More STL Interview Questions

tell about sorted linked list

1 Answers  


How the STL's are implemented, What the difference between templates and STL?

1 Answers   Symphony,


Describe the My Computer and My Documents folders; identify the elements that are present in every Window.

0 Answers  


How do I convert a stl file?

0 Answers  


help me i need a c++ program which takes sequesnce of characters and outputed sequence of their token taypes, work same compiler in lexical analysis phase

0 Answers  






How connect plc and pc through software

0 Answers  


What is a standard template library (stl)? What are the various types of stl containers?

0 Answers  


totoo po ba ang manga aliens!

0 Answers  


In what cases using of a 'template' is a better approach then using of a 'base class'?

6 Answers   Lucent, Mind Tree, Wipro,


write a piece of c++ code which allocate memory to the 50 object of type CObj

2 Answers  


How is stl different from c++ standard library?

0 Answers  


what's the difference between abstract class and concreate class? what's the meaning of standard template library(STL)?

2 Answers  


Categories