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

What is a stl vector?

0 Answers  


write a program to search and display the position of an element in a single-dimentional array using function.

1 Answers  


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

6 Answers   Lucent, Mind Tree, Wipro,


What is stl in c++ with example?

0 Answers  


What is the use of stl?

0 Answers  






Assume I have a linked list contains all of the alphabets from "A" to "Z?" I want to find the letter "Q" in the list, how does you perform the search to find the "Q?"

2 Answers  


Define stl.

0 Answers  


What are the various types of stl containers?

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  


what is an algorithm in terms of STL?

1 Answers   Lucent, Wipro,


Do you like to Submit Questions in Bulk under Same Category?? Then use our Bulk ListerDo you like to Submit Questions in Bulk under Same Category?? Then use our Bulk Lister

0 Answers  


What is meant by stl in c++?

0 Answers  


Categories