Standard Template Library (STL) Question:
Download Job Interview Questions and Answers PDF
How to get the sum of two integers?
Answer:
#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);
}
#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);
}
Download Standard Template Library (STL) Interview Questions And Answers
PDF
Previous Question | Next Question |
Tell me about c++? | Why we are using the fork command and how it works? |