Fundamental concept of Problem solving
Problem solving strategies
Program design & implementation
Introduction to C
Introduction to C
How to open C program code window
Description of C code window
Editing File
Saving and Running a program
The components of C language
Structure of C Program
A sample of C language program
C character set and keywords
C character set and keywords
The C character set
Key words
Data Types
Data Types
Primary Data Type
Secondary Data Type
Rules for constructing variables names
Variable declaration
Assigning values to variables
Scope of variables: Local & Global
Character constants
Integer constants
Real constants
Logical & String constants
C instruction set
Type Declaration & Input/Output Instructions
Arithmetic Instructions
Control Instructions
Arithmetic operators
Relational operators
Logical operators
Increment & Decrement operators
Bitwise operators
Conditional & ternary operators
The comma operators
Size of operator
Assignment operator
Type modifier
Evaluation of expression
Automatic type conversion
Basic Input/Output
Console I/O function
Disc & Port I/O function
Control Structures
Sequence control statements
Decision control & conditional statements
Case control statements
Repitition & loop control statements
Some more statements
Array and String
Introduction of Array
Array Declaration
Array Initialization
Two Dimensional Array
Multi Dimensional Array
Function and Recursion
Function Definition
Function Declaration
Function Call
Pointer expression
Pointer & functions
Pointer & Array
Multi Dimensional Arrays & Pointer
Arrays of Pointer
Use of Pointer & functions
Giving values to member
Structure Initialization
Comparison of structure variables
Arrays of structures
Arrays within structures
Structures within structures
Passing structure to function
Accessing a union member
Initialization of Union variable
Uses of Union
Dynamic Data Structure
Linked list
Data File Handling through C
File operation
Opening & closing a data file
Creating a data file
Processing a data file
Unformatted data file
C Preprocessor & Macro
Macro substitution directives
File inclusion
Compiler control directive
Command line parameter of C
Command line parameter
Header file
Header file
Use of library functions
Some Useful library functions

Array and String


Strings in C are represented by arrays of characters. The end of the string is marked with a special character, the null character, which is simply the character with the value 0.
Because C has no built-in facilities for manipulating entire arrays (copying them, comparing them, etc.), it also has very few built-in facilities for manipulating strings.
In fact, C's only truly built-in string-handling is that it allows us to use string constants (also called string literals) in our code.
Whenever we write a string, enclosed in double quotes, C automatically creates an array of characters for us, containing that string, terminated by the \0 character.
For example, we can declare and define an array of characters, and initialize it with a string constant:
char string[] = "Hello, world!";
Two ways to initilize string >
In this case, we can leave out the dimension of the array, since the compiler can compute it for us based on the size of the initializer.
This is the only case where the compiler sizes a string array for us, however; in other cases, it will be necessary that we decide how big the arrays we use to hold strings.
An example program showing the character data type array:
Out put of the program
In the above example, a character based array named word is declared, and each element of array is assigned a character.
The last element is filled with a zero value, to signify the end of the character string (in C, there is no string type, so character based arrays are used to hold strings).
A printf statement is then used to print out all elements of the array.