c Programming-chapter 01
c Programming-chapter 01
PRESENTED BY
SHEYONA G
CHAPTER-01
Overview of C
What is C Programming
Langauge?
• C is a general-purpose programming language
• C is highly portable i.e, C programs written for one computer can be run on another
with little or no modification.
• C has the ability to extend itself.
2. Link section:
This section provides instruction to the compiler to link function from system library.
Ex: #include #include
3. Definition section:
Definition section defines all symbolic constants
Ex: #define AMOUNT 1000
a. Declaration part
b. Executable part
The declaration part declares all the variables used in executable part.
These two parts must appear between the opening and closing braces.
The program execution begins at the opening brace and ends at the closing brace.
All statements in the declaration and executable parts end with a semicolon (;).
6. Sub-program section:
The sub-program section contains all the user-defined functions that are called in the main function,
User-defined functions are generally placed immediately after the main() function although they appear in any
order.
All sections, except main() function section may be absent when they are not required.
Application Of C
'C' language is used for developing system applications.
It is used for developing desktop applications.
Most of the applications by Adobe are developed using 'C' programming language.
It is used for developing browsers and their extensions.
It is used to develop databases.
MySQL is the most popular database software is built using 'C'.
It is used in developing an operating system.
It is used for developing desktop as well as mobile phone's operating system.
It is used for compiler production.
It is widely used in IOT applications.
SAMPLE C PROGRAM
EXECUTION OF C PROGRAM IN Turbo C
Step 1 : Open turbo C IDE(Integrated Development Environment), click on File and then click on New
Step 2 : Write the above example as it is
Step 3 : Click on compile or press Alt+f9 to compile the code
Step 4 : Click on Run or press Ctrl+f9 to run the code
Step 5 : Now go to compile and click on Compile. And then Click on Run. You will see the output of your C program.
Summary
'C' was developed by Dennis Ritchie in 1972.
It is a robust language.
It is a low programming level language close to machine language
It is widely used in the software development field.
It is a procedure and structure oriented language.
It has the full support of various operating systems and hardware platforms.
Many compilers are available for executing programs written in 'C'.
A compiler compiles the source file and generates an object file.
A linker links all the object files together and creates one executable file.
It is highly portable.
ASSIGNMENT QUESTIONS