Table of Contents
1. Basics of Computer
2. C Language
3. Getting Started with C
4. Working C Program
5. Operators
6. The Decision Control Structure
7. The Case Control Structure
8. The Loop Control Structure
9. Arrays
10. Functions
11. Structures
12. Pointers
13. Scope Rules: Who Knows About What
14. # define, # include
15. File Management
16. Library functions
1. Basics of the Computer
Computer:
Hardware:
Software:
Operating System:
Language Processor:
Assembly:
Interpreter:
Compiler:
Application Software:
System Development Life Cycle
System Requirement
Analysis
Design
Design
Code, System Test.
Maintenance,
Algorithm
Flow Chart
Shape Meaning
2. C Language
What is C-
Historical Development of C-
Where C stands-
a) Problem Oriented Languages/ High Level Languages:
b) Machine Oriented Languages/ Low Level Languages:
Benefits of C-
C Compiler-
3. Getting Stared with C
The C Character Set-
Constants, Variables and keywords-
Types of C Constants-
Rules for Constructing Integer Constants-
Example-
Rules for Constructing Real Constants-
Example:-
Example:-
Character constants
Rules for Constructing Character Constants-
Example-
Types of C variables-
Rules for Constructing Variable Names-
C Keywords-
C Instructions-
(a) Type declaration instruction-
(b) Input/ Output instruction-
(c) Arithmetic instruction-
(d) Control instruction-
Integer and Float conversions-
Type Conversion in Assignments-
4. Working C Program
no
A simple C program; Variables; Types and Type Declarations
Constants-
Simple I/O---getchar, putchar, printf-
Initialization of Variables-
/*
Floating Point-
5. OPERATORS
Arithmetic Operators
Assignment Operator-
Relational Operators-
Arithmetic Assignment Operators-
Logical Operators-
Example-
The Conditional Operators-
Examples:
Increment and Decrement Operators-
Bit operators-
6. THE DECISION CONTROL STRUCTURE
Compound statements: if-
else Clause; conditional Expressions
7.THE CASE CONTROL STRUCTURE
The switch Statement; break; continue-
8. THE LOOP CONTROL STRUCTURE
The while Loop; Assignment within an Expression
The for Loop-
The do-while loop-
9. ARRAYS
What is Array?
Two Dimensional Arrays
Multidimensional arrays
Dynamic arrays
Character Arrays; Strings
10. FUNCTIONS
Functions; Comment-
Local and External Variables-
Function Arguments-
* =*
11. STRUCTURES
What is Structure & Union-
Declaration
Accessing members
Initialization
Assignment
12. POINTERS
Know about Pointers-
Function Pointers
Assign an Address to a Function Pointer
Calling a Function using a Function Pointer
How to Use Arrays of Function Pointers
Pointer use for a variable
Multiple Levels of Pointers; Program Arguments-
13. SCOPE RULES: WHO KNOWS ABOUT WHAT
14. #define, # include
Backslash escapes
Storage Class
Register Variables
Static Variables
15. File Management
File operation functions in C:
Defining and opening a file:
Closing a file:
The getw and putw functions:
The fprintf & fscanf functions:
Random access to files:
fseek function
Command line arguments
Dynamic Memory Allocation
malloc and free--
calloc --
realloc --
16. Library functions
strcat(dest, source)
strchr(s, c)
strcmp(a, b) -
strcpy(dest, source)
strlen(st)
strncat(dest, source, n)
strncmp(a, b, n)
strrchr(s, c)