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

how to get the sum of two integers?

2 Answers  


i want a road rash 3d game code if some one know please help me

1 Answers  


how to swap two numbers in a linked list without exchanging the data but only the links?

3 Answers   Wipro,


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 c++

2 Answers  






What is the stl, standard template library?

0 Answers  


Explain how to insert a hyperlink in to an Excel worksheet and save a Word document as a Web page.

1 Answers  


WHAT IS FIBONACCI SERIES?

4 Answers   Stewart,


What is Constructor

14 Answers   Angel Broking,


Q1. A. What is unary operator? List out the different operators involved in the unary operator. B. What is an adjust field format flag? Q2. A. Distinguish between a # include and #define. B. Can a list of string be stored within a two dimensional array? Q3. A.Explain how a pointer to function can be declared in C++? B.List the merits and demerits of declaring a nested class in C++? Q4. A. What are the syntactic rules to be avoid ambiguity in multiple inheritence? B. Explain the operation of overloading of an assignment operator. Q5. A. Explain how the virtual base class is different from the conventional base classes of the opps. B. Explain how an exception handler is defined and invoked in a Program. Q6. A. What is a binary file? List the merits and demerits of the binary file usagein C++. B. Write short notes on Text Manipulation Routines. C. Write bites in Turbo c++ Header (“Include”) Files.

0 Answers   GE, Infosys, Microsoft, NIM,


5. Write c++ function that would intake a string and return the number of occurrences of a given character in that sring Ex:- if the word is “Colombo” and count the occurrences of the letter “o” the function would return 3

1 Answers  


Who wrote stl?

0 Answers  


Categories