- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
C Program to Add two Integers
A program to add two numbers takes to numbers and does their mathematical sum and gives it to another variable that stores its sum.
Example Code
#include <stdio.h> int main(void) { int a = 545; int b = 123; printf("The first number is %d and the second number is %d
", a , b); int sum = a + b; printf("The sum of two numbers is %d" , sum); return 0; }
Output
The first number is 545 and the second number is 123 The sum of two numbers is 668
Advertisements