C PROGRAMMING
INTRODUCTION TO C
C is a high level programming language which
was developed by DENNIS RITCHIE in the year
1972 at the BELL Laboratory.
It was originally developed for UNIX Operating
system to beat issues of previous languages such
as B language in 1969.
From Unix and Windows to Tic Tac Toe and
Photoshop are built in C .
GCC compiler
FEATURES OF C
Core language
Portable, Extensible
Built in functions and operators
Structural language
Modular programming language
Compilation Execution is faster
Case sensitive
Platform dependent language
Easy to learn-32 keywords
VARIABLES,CONSTANTS,
DATA TYPES
Variable is a named memory location to store data.
A constant is a name given to the variable whose
values can’t be altered.
Data type specifies which type of value a variable
has and basically there are four data types in C
[Link]
[Link] point
[Link]
[Link]
KEYWORDS
Keywords are predefined, words that have
special meanings to the compiler.
STRUCTURE OF C
PROGRAM
1. Documentation section // or
/*……………*/
2. Link section – header files
3. Definition section
4. Global declaration section
5. Main section
6. Sub program section
#include<stdio.h>
//for adding two numbers
void main()
{
int a,b,c;
printf(“\nEnter two numbers: ”);
scanf(“%d%d”,&a,&b);
c=a+b;
printf(“\nSum =%d”,c);
}
THANKYOU