How to calculate sum

Answers were Sorted based on User's Feedback



How to calculate sum..

Answer / deepanshu dubey

#include<stdio.h>
#include<conio.h>
#include<math.h>
main()
{
int a,b,c;
printf("Enter two numbers\n");
scanf("%d%d",&a,&b);
c=a+b;
printf("%d\n",c);
}

Is This Answer Correct ?    8 Yes 2 No

How to calculate sum..

Answer / avinash jadhav

#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int num1,num2,sum;
clrscr();
printf("\nEnter the 2 numbers\n");
scanf("%d%d",&a,&b);
sum=num1+num2;
printf("The sum of the two number is %d\n",sum);
getch();
}

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More C Interview Questions

what is a void pointer?

2 Answers  


What is the difference between typedef struct and struct?

0 Answers  


Identify the correct argument for the function call fflush () in ANSI C: A)stdout B)stdin C)stderr D)All the above

5 Answers   Accenture, TCS,


why do some people write if(0 == x) instead of if(x == 0)?

0 Answers  


How can you allocate arrays or structures bigger than 64K?

0 Answers  


What are local variables c?

0 Answers  


do ne body have any idea about the salary for the we r going to have interview. yup .. u got it right ..i m talking abt NIC.

1 Answers  


a=5 a=a++/++a

14 Answers   Bhel,


What is the restrict keyword in C?

2 Answers  


Write a program to compare two strings without using the strcmp() function

42 Answers   Accenture, Arba Minch University,


What are 3 types of structures?

0 Answers  


Explain about block scope in c?

0 Answers  


Categories