Basics of C Language: by Chinnu Edwin A M.Tech. CS
Basics of C Language: by Chinnu Edwin A M.Tech. CS
By
Chinnu Edwin A
M.Tech. CS
CONTENTS
• Introduction
• C Program structure
• Parts of C Program
• C – Basic Syntax
INTRODUCTION
• Programming language
• Developed by Dennis Ritchie in 1972
• Structured language
• Easy to learn
• Produces efficient programs
SAMPLE C PROGRAM
STRUCTURE
#include <stdio.h>
int main()
{
/* printf function displays the content present in
double quotes. */
printf("Hello World");
return 0;
•}
PARTS OF C PROGRAM
• A C program basically consists of the following parts −
• Preprocessor Commands
• Functions
• Variables
• Statements & Expressions
• Comments
C BASIC SYNTAX
C LANGUAGE TOKENS
• It tells the compiler where and how much storage to create for the variable.
• A variable definition specifies a data type and contains a list of one or more variables of that type
as follows −
type variable_list;