W e b t u t o r i a l s

Programing Approach

Algorithm, Flow Chart

Define C

Define Programming

C - Syntax

C - Variables

C - Keywords

C - Data Types

C - Comments

Turbo C - Shortcut keys

C - Operators

Hierarchy of Operators

Ex: Arithmetic Operator

Control Structure

Control Structure - if

Ex: If condition

Ex: Inc / Dec Operator

C - loops

Ex: Loops

C - Nesting Of loops

Ex: Nested Loops

Constant Variable

C - Escape Sequence

C - Arrays 1D, 2D

C - Sorting


Character I/O Function

C - Strings

Ex: Strings

Array of Strings

C - Math Functions

C - Functions

C - Types of Functions

Storage Class

C - Header Files

C - Preprocessor

C - Pointers

C - Structures

Typedef File Handling

Command Line Argument


Define C Variables

Variables are use to store values temporary entered by a user. Variables are the entity that may vary during program execution. Variable names are called identifiers.

Rules to declare a variable:

1. The variable name can contains of any sequence of alphabets, numbers and underscore.
2. Variable name should not exceed 30 characters.
3. Variable name can be Alpha-numeric e.g. no1.
4. Special characters, blank space or any comma are not allowed.
5. The first character should be alphabet or an underscore.
6. Variable name cannot start with a number.
7. Upper and lower case letters are distinguishable.
8. A Keyword cannot be used to declare a variable name.

Example: Valid Variable names:
int _a; // can start with underscore character.
float r1; // can contain number.
double circle_area; // can contain underscore character.

Example: In-Valid Variable names:
int $a; //connot start with special symbols like $.
float 1r; //invalid, cannot start with a number.
double circle area; //invalid, connot contain space.

Note: In C, all variables must be declared before use with its data type.