C program to add two numbers

C program to add two numbers: This c language program perform the basic arithmetic operation of addition on two numbers and then prints the sum on the screen. For example if the user entered two numbers as 5, 6 then 11 (5 + 6) will be printed on the screen.

C programming code

#include
 
int main()
{
   int a, b, c;
 
   printf("Enter two numbers to add\n");
   scanf("%d%d",&a,&b);
 
   c = a + b;
 
   printf("Sum of entered numbers = %d\n",c);
 
   return 0;
}

C programming examples

These programs illustrate various programming elements, concepts such as using operators, loops, functions, single and double dimensional arrays, performing operations on strings, files, pointers etc. 
Browse the code from simple c program to complicated ones you are looking for, every one of them is provided with output. 
C program download with executable files, so that you save on your computer and run programs without compiling the source code. All programs are made using c programming language and Codeblocks, most of these will work under Dev C++ compiler also. 
The first program prints "Hello World" on screen.


  1. Hello World
  2. Print Integer
  3. Addition
  4. Odd or Even
  5. Add, Subtract, Multiply and Divide 
  6. Leap year
  7. Factorial
  8. HCF and LCM
  9. Add n numbers
  10. Swapping
  11. Reverse number
  12. Palindrome number
  13. Print Pattern
  14. Prime numbers
  15. Find Armstrong number
  16. Fibonacci series

C program print integer

This c program first inputs an integer and then prints it. 
Input is done using scanf function and number is printed on screen using printf.
In c language we have data type for different types of data, for integer data it is int, for character date char, for floating point data it's float and so on.

C programming code

#include 
 
int main()
{
  int a;
 
  printf("Enter an integer\n");
  scanf("%d", &a);
 
  printf("Integer that you have entered is %d\n", a);
 
  return 0;
}

C hello world program

C hello world program: c programming language code to print hello world. This program prints hello world, printf library function is used to display text on screen, '\n' places cursor on the beginning of next line, stdio.h header file contains declaration of printf function. 
The code will work on all operating systems may be its Linux, Mac or any other and compilers. To learn a programming language you must start writing programs in it and may be your first c code while learning programming.

Hello world in C language

//C hello world example
#include 
 
int main()
{
  printf("Hello world\n");
  return 0;
}
Purpose of Hello world program may be to say hello to people or the users of your software or application.


Computer Network : Mesh Network Topology

Mesh topologies involve the concept of routes. Unlike each of the previous topologies, messages sent on a mesh network can take any of several possible paths from source to destination. (Recall that even in a ring, although two cable paths exist, messages can only travel in one direction.) Some WANs, most notably the Internet, employ mesh routing.
A mesh network in which every device connects to every other is called a full mesh. 
The mesh network topology employs either of two schemes, called full mesh and partial mesh. In the full mesh topology, each workstation is connected directly to each of the others. In the partial mesh topology, some workstations are connected to all the others, and some are connected only to those other nodes with which they exchange the most data.

Slow Up by George Saoulidis. $8.99 from Smashwords.com
How Fast Can You Think? Limitless meets Black Mirror in this novel that pushes the limits of a couple's minds.


Computer Network : Tree Network Topology

Tree topologies integrate multiple star topologies together onto a bus. In its simplest form, only hub devices connect directly to the tree bus, and each hub functions as the root of a tree of devices. This bus/star hybrid approach supports future expandability of the network much better than a bus (limited in the number of devices due to the broadcast traffic it generates) or a star (limited by the number of hub connection points) alone.

Celebrity Authors’ Secrets - The World’s Greatest Living Authors Reveal How They Sell Millions of Books by Stephanie Hale. $12.99 from Smashwords.com
Twelve of the world's greatest living authors reveal their tips for writing a book that sells over a million copies in Celebrity Authors' Secrets. A must-have guide - filled with publishing and book marketing info - for aspiring writers, authors, publishers, editors, writing coaches, creative writing tutors and anyone who loves books. Find out how to make your book stand out from the masses!

This topology divides the network in to multiple levels/layers of network. Mainly in LANs, a network is bifurcated into three types of network devices. The lowest most is access-layer where user’s computer are attached. The middle layer is known as distribution layer, which works as mediator between upper layer and lower layer. The highest most layer is known as Core layer, and is central point of the network, i.e. root of the tree from which all nodes fork.


How to Create a Trade Mark, Protect it and Build your Brand by Liam M Birkett. $9.99 from Smashwords.com
You will learn how to devise your trade mark The essential steps to ensure that you can use the mark How to register and protect it How to exploit multiple types of trade marks The misconceptions regarding company names Errors relating to domain names How to use your branding to get free publicity How to add value to your brand A strategy to follow for expansion Practical examples of trade marks