Professional Documents
Culture Documents
Lecture 1
Lecture 1
E-mail: mohmoawad@mans.edu.eg
Lecture 1
How to Set Up a Development Environment for
C Programming
To start writing C programs on your local machine, you will need the
following:
• A C Compiler
• An Integrated Development Environment (IDE)
Steps of C Programming
Types of programming errors
These errors are mainly
occurred due to the mistakes
while typing
void main()
{
Variable declarations;
// This is the program body comment
int a;
short int a,b=11,d=-240;
long int c=296863,f;
Float p,q=2.795;
double n,q=3695.3698526;
#include<stdio.h>
void main()
{
printf(“Hello World”);
}
Example 1: Write a program to read two integer numbers and print
their summation and average.
#include<stdio.h>
void main()
{
int num1,num2,sum;
float aver;
scanf(“%d %d”, &num1,&num2);
sum=num1+num2;
aver=(num1+num2)/2;
printf(“The summation =%d, and the average=%f”,sum,aver);
}