SlideShare a Scribd company logo
1 of 33
INTRODUCTION OF C LANGUAGE .
1
PREPARED BY
BAKRANIYA KALPESH
Outline
2
INTRODUCTION OF C LANGUAGE
IMPORTANCE OF C
PRINT THE SIMPLE PROGRAM IN C LANGUAGE
BASIC STRUCTURE OF C PROGRAMS
PROCESS OF COMPILING AND RUNNING A C
PROGRAM
C ENVIRONMENT SETUP
WHY TO USE C ?
WHAT ARE THE BENEFITS OF THE LEARNING C
PROGRAMMING
WHY WE SAY C IS MIDDLE LEVEL LANGUAGE??
3
INTRODUCTION OF C LANGUAGE
C is a procedural programming language. It was initially developed by Dennis Ritchie
between 1969 and 1973. It was mainly developed as a system programming language
to write operating system. The main features of C language include low-level access
to memory, simple set of keywords, and clean style, these features make C language
suitable for system programming like operating system or compiler development.
Many later languages have borrowed syntax/features directly or indirectly from C
language. Like syntax of Java, PHP, JavaScript and many other languages is mainly
based on C language. C++ is nearly a superset of C language (There are few
programs that may compile in C, but not in C++).
4
A Brief History of C
C is a general-purpose language which has been closely associated with the UNIX
operating system for which it was developed - since the system and most of the
programs that run it are written in C.Many of the important ideas of C stem from the
language BCPL, developed by Martin Richards. The influence of BCPL on proceeded
indirectly through the language B, which was written by Ken Thompson in 1970 at
Bell Labs, for the first UNIX system on a DEC PDP-7. BCPL and B are "type less"
languages whereas C provides a variety of data types.In 1972 Dennis Ritchie at Bell
Labs writes C and in 1978 the publication of The C Programming Language by
Kernighan & Ritchie caused a revolution in the computing world.In 1983, the American
National Standards Institute (ANSI) established a committee to provide a modern,
comprehensive definition of C. The resulting definition, the ANSI standard, or "ANSI
C", was completed late 1988.
5
It is robust language whose rich setup of built in functions and operator can be used
to write any complex program.
Program written in C are efficient due to several variety of data types and powerful
operators.
The C compiler combines the capabilities of an assembly language with the feature
of high level language. Therefore it is well suited for writing both system software
and business package.
There are only 32 keywords; several standard functions are available which can be
used for developing program.
IMPORTANCE OF C LANGUAGE
6
C is portable language; this means that C programs written for one computer
system can be run on another system, with little or no modification.
C language is well suited for structured programming, this requires user to think of a
problems in terms of function or modules or block. A collection of these modules
make a program debugging and testing easier.
C language has its ability to extend itself. A c program is basically a collection of
functions that are supported by the C library. We can continuously add our own
functions to the library with the availability of the large number of functions.
In India and abroad mostly people use C programming language because it is easy
to learn and understand.
7
PRINT THE SIMPLE PROGRAM IN C LANGUAGE
8
Above programe
Output is here
#include<stdio.h>
#include<conio.h>
Is called Header file stadio.h “stands for "standard input output” and “conio.h
provide console input output”
main() is called function
main() function is the entry point of any C program. It is the point at which
execution of program is started. When a C program is executed, the execution
control goes directly to the main() function. EveryC program have a main()
function.
9
printf()
Printf format string (of which "printf" stands for "print formatted") refers to a
control parameter used by a class of functions in the string-processing libraries
of various programming languages.
;
Is Called Semicolon and Every C Statement in C should end with a semicolon(;)
mark.
Note :remaining thing we study next chapter
10
BASIC STRUCTURE OF C PROGRAMS
11
Documentation Section
This section consists of comment lines which include the name of programmer, the
author and other details like time and date of writing the program. Documentation
section helps anyone to get an overview of the program.
Link Section
The link section consists of the header files of the functions that are used in the
program. It provides instructions to the compiler to link functions from the system
library.
12
Definition Section
All the symbolic constants are written in definition section. Macros are known as
symbolic constants.
Global Declaration Section
The global variables that can be used anywhere in the program are declared in
global declaration section. This section also declares the user defined functions.
13
main() Function Section
It is necessary have one main() function section in every C program. This section
contains two parts, declaration and executable part. The declaration part declares
all the variables that are used in executable part. These two parts must be written
in between the opening and closing braces. Each statement in the declaration and
executable part must end with a semicolon (;). The execution of program starts at
opening braces and ends at closing braces.
14
Subprogram Section
The subprogram section contains all the user defined functions that are used to
perform a specific task. These user defined functions are called in the main()
function.
15
PROCESS OF COMPILING
AND RUNNING A C
PROGRAM
16
C ENVIRONMENT SETUP
C Compiler is a program that converts human readable code into machine
readable code. This process is called compilation.
Human readable code is a program that consists of letters, digits and special
characters that we type in program window. Machine readable code is in 0’s &
1’s
For example, let’s assume that we type ” HELLO” in program window. We know
that we have typed “HELLO” in program window.
But, processor knows only 01001000 for letter “H”, 01000101 for letter “E”,
01001100 for letter “L”, 01001100 for letter “L”, 01001111 for letter “O”
17
Because, all C programs are executed by processor which is available in CPU
So, entire C source code should be converted into 0’s and 1’s as processor can
understand only 0’s and 1’s.
So, compiler converts entire source code into 0’s and 1’s during compilation.
Output produced by compiler is in the form of 0’s and 1’s which is saved in .exe
file. This file is called as executable or binary file.
This binary file is executed by processor as per logic written in source code and
the output is displayed in output window.
18
There are so many compilers available in market for Windows operating system.
We are listing some of them here for your reference.
1. GCC compiler
2. clang
3. Cygwin
4. Digital mars
5. MikroC Compiler
6. Portable C Compiler, Power C, QuickC, Ritchie C Compiler, Small-C etc..
19
Nowadays, both C and C++ compilers are integrated together in same
development environment.
For example, Turbo C++, Code Block Borland C++ and DevC++ provides
Integrated Development Environment with compiler for both C and C++
programming language.
So, we can compile and execute both C and C++ programs in same Integrated
Development Environment (IDE).
here we have see process how to install code block step by step guide and you
can also install as per above IDE for required you have any one of them install
your machine like code block , for c and c++ program to be execute
20
Installation Process For Code Block IDE
STEP 1
21
STEP 2
22
STEP 3
23
STEP 4
24
STEP 5
25
STEP 6
26
WHY DO WE USE C LANGUAGE ???
It was (and still is in some circumstances) the language of choice in Operating
System Development (including all of Unix).
It allows you direct control over the very low level aspects of the computer.
Many legacy programs are written in C.
Most of the things you learn with C will be directly transferable to future
programming languages
Programs that are created with C run very quickly.
27
The programs you create in C will run "standalone". All of the programs we
wrote in Matlab, need Matlab in order to work, and if you don't have access to
Matlab, you are out of luck. C programs, once compiled into "executables", can
be transferred to other (similar) machines, and run without the need for the
source code.
Many of the codes you will use in your future work/studies will have been written
in C. You should at the least, be able to read them. And hopefully, you will be
able to maintain, modify, and update them.
28
WHAT ARE THE BENEFITS OF THE LEARNING
C PROGRAMMING
As a middle level language, C combines the features of both high level and low
level languages. It can be used for low-level programming, such as scripting for
drivers and kernels and it also supports functions of high level programming
languages, such as scripting for software applications etc.
C is a structured programming language which allows a complex program to be
broken into simpler programs called functions. It also allows free movement of
data across these functions.
29
Various features of C including direct access to machine level hardware APIs,
presence of C compilers, deterministic resource use and dynamic memory
allocation make C language an optimum choice for scripting applications and
drivers of embedded systems.
C language is case-sensitive which means lowercase and uppercase letters
are treated differently.
C is highly portable and is used for scripting system applications which form a
major part of Windows, UNIX and Linux operating system.
30
C is a general purpose programming language and can efficiently work on
enterprise applications, games, graphics, and applications requiring calculations
etc.
C language has a rich library which provides a number of built-in functions. It also
offers dynamic memory allocation.
C implements algorithms and data structures swiftly, facilitating faster
computations in programs. This has enabled the use of C in applications requiring
higher degrees of calculations like MATLAB and Mathamatica.
31
WHY WE SAY C IS MIDDLE LEVE LANGUAGE?
C combines the features of both Assembly Level Languages (Low Level
Languages) and Higher Level Languages. For this reason, C is referred to as a
Middle Level Language. The feature of ALLs is that of enabling us to develop
system level programs and the features of HLLs are those of higher degree of
readability and machine independence.
C Programming Supports Inline Assembly Language Programs .
Using inline assembly language feature in C we can directly access system
registers.
C Programming is used to access memory directly using pointer.
32
C Programming also Supports high Level Language Features.
It is more User friendly as compare to Previous languages so C
programming is Middle Level Language.
33
Good bye
Prepared by
BAKRANIYA KALPESH

More Related Content

What's hot

Programming Fundamental Presentation
Programming Fundamental PresentationProgramming Fundamental Presentation
Programming Fundamental Presentationfazli khaliq
 
C Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYC Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYRajeshkumar Reddy
 
Programming languages
Programming languagesProgramming languages
Programming languagesSimon Mui
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming conceptssalmankhan570
 
Introduction of c programming
Introduction of c programmingIntroduction of c programming
Introduction of c programmingTarun Sharma
 
Comparative Study of programming Languages
Comparative Study of programming LanguagesComparative Study of programming Languages
Comparative Study of programming LanguagesIshan Monga
 
Programming Languages An Intro
Programming Languages An IntroProgramming Languages An Intro
Programming Languages An IntroKimberly De Guzman
 
Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languagesVarun Garg
 
1 introduction to c programming language
1 introduction to c programming language1 introduction to c programming language
1 introduction to c programming languageNarendra Soni
 
Programming language
Programming languageProgramming language
Programming languageMakku-Sama
 
PROGRAMMING LANGUAGES
PROGRAMMING LANGUAGESPROGRAMMING LANGUAGES
PROGRAMMING LANGUAGESABHINAV SINGH
 
Programing language
Programing languagePrograming language
Programing languageJames Taylor
 
Theory of programming
Theory of programmingTheory of programming
Theory of programmingtcc_joemarie
 
Computer Programming Overview
Computer Programming OverviewComputer Programming Overview
Computer Programming Overviewagorolabs
 
Introduction To Computer Programming
Introduction To Computer ProgrammingIntroduction To Computer Programming
Introduction To Computer ProgrammingHussain Buksh
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programmingNeeru Mittal
 
Ndu06 typesof language
Ndu06 typesof languageNdu06 typesof language
Ndu06 typesof languagenicky_walters
 

What's hot (20)

Programming Fundamental Presentation
Programming Fundamental PresentationProgramming Fundamental Presentation
Programming Fundamental Presentation
 
C Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDYC Unit 1 notes PREPARED BY MVB REDDY
C Unit 1 notes PREPARED BY MVB REDDY
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Basic programming concepts
Basic programming conceptsBasic programming concepts
Basic programming concepts
 
Introduction of c programming
Introduction of c programmingIntroduction of c programming
Introduction of c programming
 
Comparative Study of programming Languages
Comparative Study of programming LanguagesComparative Study of programming Languages
Comparative Study of programming Languages
 
Programming Languages An Intro
Programming Languages An IntroProgramming Languages An Intro
Programming Languages An Intro
 
Lect 1. introduction to programming languages
Lect 1. introduction to programming languagesLect 1. introduction to programming languages
Lect 1. introduction to programming languages
 
1 introduction to c programming language
1 introduction to c programming language1 introduction to c programming language
1 introduction to c programming language
 
Programming language
Programming languageProgramming language
Programming language
 
PROGRAMMING LANGUAGES
PROGRAMMING LANGUAGESPROGRAMMING LANGUAGES
PROGRAMMING LANGUAGES
 
Programing language
Programing languagePrograming language
Programing language
 
Unit 1
Unit 1Unit 1
Unit 1
 
Theory of programming
Theory of programmingTheory of programming
Theory of programming
 
Computer Programming Overview
Computer Programming OverviewComputer Programming Overview
Computer Programming Overview
 
Introduction To Computer Programming
Introduction To Computer ProgrammingIntroduction To Computer Programming
Introduction To Computer Programming
 
Programming landuages
Programming landuagesProgramming landuages
Programming landuages
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
 
Programing Language
Programing LanguagePrograming Language
Programing Language
 
Ndu06 typesof language
Ndu06 typesof languageNdu06 typesof language
Ndu06 typesof language
 

Similar to Introduction to C Language Basics and Its Importance

Fundamental of Information Technology - UNIT 7
Fundamental of Information Technology - UNIT 7Fundamental of Information Technology - UNIT 7
Fundamental of Information Technology - UNIT 7Shipra Swati
 
Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Nuzhat Memon
 
C Programming language - introduction
C Programming  language - introduction  C Programming  language - introduction
C Programming language - introduction GopikaS12
 
C-PROGRAMMING-LANGUAGE.pptx
C-PROGRAMMING-LANGUAGE.pptxC-PROGRAMMING-LANGUAGE.pptx
C-PROGRAMMING-LANGUAGE.pptxDhirendraShahi2
 
Introduction of c language
Introduction of c languageIntroduction of c language
Introduction of c languagefarishah
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfSubramanyambharathis
 
Introduction to Computer
Introduction to ComputerIntroduction to Computer
Introduction to Computerzaheeriqbal41
 
C language part 1
C language part  1C language part  1
C language part 1JyothiG33
 
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTTC programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTTBatra Centre
 
Unit-2_Getting Started With ‘C’ Language (3).pptx
Unit-2_Getting Started With ‘C’ Language (3).pptxUnit-2_Getting Started With ‘C’ Language (3).pptx
Unit-2_Getting Started With ‘C’ Language (3).pptxSanketShah544615
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptxMugilvannan11
 
Chapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptxChapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptxAbdalla536859
 

Similar to Introduction to C Language Basics and Its Importance (20)

Programming in c
Programming in cProgramming in c
Programming in c
 
Introduction to C Programming
Introduction to C ProgrammingIntroduction to C Programming
Introduction to C Programming
 
C language
C languageC language
C language
 
Fundamental of Information Technology - UNIT 7
Fundamental of Information Technology - UNIT 7Fundamental of Information Technology - UNIT 7
Fundamental of Information Technology - UNIT 7
 
Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)Std 10 computer chapter 10 introduction to c language (part1)
Std 10 computer chapter 10 introduction to c language (part1)
 
CS3251-_PIC
CS3251-_PICCS3251-_PIC
CS3251-_PIC
 
C Programming language - introduction
C Programming  language - introduction  C Programming  language - introduction
C Programming language - introduction
 
Programming in c
Programming in cProgramming in c
Programming in c
 
Programming in C
Programming in CProgramming in C
Programming in C
 
C-PROGRAMMING-LANGUAGE.pptx
C-PROGRAMMING-LANGUAGE.pptxC-PROGRAMMING-LANGUAGE.pptx
C-PROGRAMMING-LANGUAGE.pptx
 
Introduction of c language
Introduction of c languageIntroduction of c language
Introduction of c language
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
 
Introduction to Computer
Introduction to ComputerIntroduction to Computer
Introduction to Computer
 
C.pdf
C.pdfC.pdf
C.pdf
 
C language part 1
C language part  1C language part  1
C language part 1
 
C language part 1
C language part  1C language part  1
C language part 1
 
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTTC programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
C programming notes BATRACOMPUTER CENTRE IN Ambala CANTT
 
Unit-2_Getting Started With ‘C’ Language (3).pptx
Unit-2_Getting Started With ‘C’ Language (3).pptxUnit-2_Getting Started With ‘C’ Language (3).pptx
Unit-2_Getting Started With ‘C’ Language (3).pptx
 
C Programming UNIT 1.pptx
C Programming  UNIT 1.pptxC Programming  UNIT 1.pptx
C Programming UNIT 1.pptx
 
Chapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptxChapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptx
 

Recently uploaded

AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 

Recently uploaded (20)

AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 

Introduction to C Language Basics and Its Importance

  • 1. INTRODUCTION OF C LANGUAGE . 1 PREPARED BY BAKRANIYA KALPESH
  • 2. Outline 2 INTRODUCTION OF C LANGUAGE IMPORTANCE OF C PRINT THE SIMPLE PROGRAM IN C LANGUAGE BASIC STRUCTURE OF C PROGRAMS PROCESS OF COMPILING AND RUNNING A C PROGRAM C ENVIRONMENT SETUP WHY TO USE C ? WHAT ARE THE BENEFITS OF THE LEARNING C PROGRAMMING WHY WE SAY C IS MIDDLE LEVEL LANGUAGE??
  • 3. 3 INTRODUCTION OF C LANGUAGE C is a procedural programming language. It was initially developed by Dennis Ritchie between 1969 and 1973. It was mainly developed as a system programming language to write operating system. The main features of C language include low-level access to memory, simple set of keywords, and clean style, these features make C language suitable for system programming like operating system or compiler development. Many later languages have borrowed syntax/features directly or indirectly from C language. Like syntax of Java, PHP, JavaScript and many other languages is mainly based on C language. C++ is nearly a superset of C language (There are few programs that may compile in C, but not in C++).
  • 4. 4 A Brief History of C C is a general-purpose language which has been closely associated with the UNIX operating system for which it was developed - since the system and most of the programs that run it are written in C.Many of the important ideas of C stem from the language BCPL, developed by Martin Richards. The influence of BCPL on proceeded indirectly through the language B, which was written by Ken Thompson in 1970 at Bell Labs, for the first UNIX system on a DEC PDP-7. BCPL and B are "type less" languages whereas C provides a variety of data types.In 1972 Dennis Ritchie at Bell Labs writes C and in 1978 the publication of The C Programming Language by Kernighan & Ritchie caused a revolution in the computing world.In 1983, the American National Standards Institute (ANSI) established a committee to provide a modern, comprehensive definition of C. The resulting definition, the ANSI standard, or "ANSI C", was completed late 1988.
  • 5. 5 It is robust language whose rich setup of built in functions and operator can be used to write any complex program. Program written in C are efficient due to several variety of data types and powerful operators. The C compiler combines the capabilities of an assembly language with the feature of high level language. Therefore it is well suited for writing both system software and business package. There are only 32 keywords; several standard functions are available which can be used for developing program. IMPORTANCE OF C LANGUAGE
  • 6. 6 C is portable language; this means that C programs written for one computer system can be run on another system, with little or no modification. C language is well suited for structured programming, this requires user to think of a problems in terms of function or modules or block. A collection of these modules make a program debugging and testing easier. C language has its ability to extend itself. A c program is basically a collection of functions that are supported by the C library. We can continuously add our own functions to the library with the availability of the large number of functions. In India and abroad mostly people use C programming language because it is easy to learn and understand.
  • 7. 7 PRINT THE SIMPLE PROGRAM IN C LANGUAGE
  • 8. 8 Above programe Output is here #include<stdio.h> #include<conio.h> Is called Header file stadio.h “stands for "standard input output” and “conio.h provide console input output” main() is called function main() function is the entry point of any C program. It is the point at which execution of program is started. When a C program is executed, the execution control goes directly to the main() function. EveryC program have a main() function.
  • 9. 9 printf() Printf format string (of which "printf" stands for "print formatted") refers to a control parameter used by a class of functions in the string-processing libraries of various programming languages. ; Is Called Semicolon and Every C Statement in C should end with a semicolon(;) mark. Note :remaining thing we study next chapter
  • 10. 10 BASIC STRUCTURE OF C PROGRAMS
  • 11. 11 Documentation Section This section consists of comment lines which include the name of programmer, the author and other details like time and date of writing the program. Documentation section helps anyone to get an overview of the program. Link Section The link section consists of the header files of the functions that are used in the program. It provides instructions to the compiler to link functions from the system library.
  • 12. 12 Definition Section All the symbolic constants are written in definition section. Macros are known as symbolic constants. Global Declaration Section The global variables that can be used anywhere in the program are declared in global declaration section. This section also declares the user defined functions.
  • 13. 13 main() Function Section It is necessary have one main() function section in every C program. This section contains two parts, declaration and executable part. The declaration part declares all the variables that are used in executable part. These two parts must be written in between the opening and closing braces. Each statement in the declaration and executable part must end with a semicolon (;). The execution of program starts at opening braces and ends at closing braces.
  • 14. 14 Subprogram Section The subprogram section contains all the user defined functions that are used to perform a specific task. These user defined functions are called in the main() function.
  • 15. 15 PROCESS OF COMPILING AND RUNNING A C PROGRAM
  • 16. 16 C ENVIRONMENT SETUP C Compiler is a program that converts human readable code into machine readable code. This process is called compilation. Human readable code is a program that consists of letters, digits and special characters that we type in program window. Machine readable code is in 0’s & 1’s For example, let’s assume that we type ” HELLO” in program window. We know that we have typed “HELLO” in program window. But, processor knows only 01001000 for letter “H”, 01000101 for letter “E”, 01001100 for letter “L”, 01001100 for letter “L”, 01001111 for letter “O”
  • 17. 17 Because, all C programs are executed by processor which is available in CPU So, entire C source code should be converted into 0’s and 1’s as processor can understand only 0’s and 1’s. So, compiler converts entire source code into 0’s and 1’s during compilation. Output produced by compiler is in the form of 0’s and 1’s which is saved in .exe file. This file is called as executable or binary file. This binary file is executed by processor as per logic written in source code and the output is displayed in output window.
  • 18. 18 There are so many compilers available in market for Windows operating system. We are listing some of them here for your reference. 1. GCC compiler 2. clang 3. Cygwin 4. Digital mars 5. MikroC Compiler 6. Portable C Compiler, Power C, QuickC, Ritchie C Compiler, Small-C etc..
  • 19. 19 Nowadays, both C and C++ compilers are integrated together in same development environment. For example, Turbo C++, Code Block Borland C++ and DevC++ provides Integrated Development Environment with compiler for both C and C++ programming language. So, we can compile and execute both C and C++ programs in same Integrated Development Environment (IDE). here we have see process how to install code block step by step guide and you can also install as per above IDE for required you have any one of them install your machine like code block , for c and c++ program to be execute
  • 20. 20 Installation Process For Code Block IDE STEP 1
  • 26. 26 WHY DO WE USE C LANGUAGE ??? It was (and still is in some circumstances) the language of choice in Operating System Development (including all of Unix). It allows you direct control over the very low level aspects of the computer. Many legacy programs are written in C. Most of the things you learn with C will be directly transferable to future programming languages Programs that are created with C run very quickly.
  • 27. 27 The programs you create in C will run "standalone". All of the programs we wrote in Matlab, need Matlab in order to work, and if you don't have access to Matlab, you are out of luck. C programs, once compiled into "executables", can be transferred to other (similar) machines, and run without the need for the source code. Many of the codes you will use in your future work/studies will have been written in C. You should at the least, be able to read them. And hopefully, you will be able to maintain, modify, and update them.
  • 28. 28 WHAT ARE THE BENEFITS OF THE LEARNING C PROGRAMMING As a middle level language, C combines the features of both high level and low level languages. It can be used for low-level programming, such as scripting for drivers and kernels and it also supports functions of high level programming languages, such as scripting for software applications etc. C is a structured programming language which allows a complex program to be broken into simpler programs called functions. It also allows free movement of data across these functions.
  • 29. 29 Various features of C including direct access to machine level hardware APIs, presence of C compilers, deterministic resource use and dynamic memory allocation make C language an optimum choice for scripting applications and drivers of embedded systems. C language is case-sensitive which means lowercase and uppercase letters are treated differently. C is highly portable and is used for scripting system applications which form a major part of Windows, UNIX and Linux operating system.
  • 30. 30 C is a general purpose programming language and can efficiently work on enterprise applications, games, graphics, and applications requiring calculations etc. C language has a rich library which provides a number of built-in functions. It also offers dynamic memory allocation. C implements algorithms and data structures swiftly, facilitating faster computations in programs. This has enabled the use of C in applications requiring higher degrees of calculations like MATLAB and Mathamatica.
  • 31. 31 WHY WE SAY C IS MIDDLE LEVE LANGUAGE? C combines the features of both Assembly Level Languages (Low Level Languages) and Higher Level Languages. For this reason, C is referred to as a Middle Level Language. The feature of ALLs is that of enabling us to develop system level programs and the features of HLLs are those of higher degree of readability and machine independence. C Programming Supports Inline Assembly Language Programs . Using inline assembly language feature in C we can directly access system registers. C Programming is used to access memory directly using pointer.
  • 32. 32 C Programming also Supports high Level Language Features. It is more User friendly as compare to Previous languages so C programming is Middle Level Language.