how to get the sum of two integers?
Answers were Sorted based on User's Feedback
#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 |
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 |
differentiate between private, public and protected data members of the class using example.
In what cases using of a 'template' is a better approach then using of a 'base class'?
6 Answers Lucent, Mind Tree, Wipro,
Explain References in C++
Find the error in the following program struct point {struct point *next; int data; } x; main() {int...data; } x; main() {int i; for(x=p;x!=0;) x=x->next,x++; freelist(x); } freelist(x) {free(x); return }
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
What is the use of stl?
WHAT IS THE DIFFERENCE BETWEEN C++ AND VC++
how to overload << and >> operator in c++
write a program to search and display the position of an element in a single-dimentional array using function.
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?"
How the STL's are implemented, What the difference between templates and STL?