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

C Tutorial

Programing Approach


Flow Chart

Define C

Define Programming

C - Syntax

Compiler vs Interpreter

C - Variables

C - Keywords

C - Data Types

C - Comments

Turbo C - Shortcut keys

C - Operators

Hierarchy of Operators

Ex: Arithmetic Operator

C - Formatting Output

Constant Variable

C - Escape Sequence

C - if , switch

Ex: If condition

Ex: Inc / Dec Operator

C - loops

Ex: Loops

C - Nesting Of loops

Ex: Nested Loops

Jumping Statements

C - Arrays 1D

C - Arrays 2D

C - Sorting


Character I/O Function

C - String Functions

Ex: Strings

Array of Strings

C - Math Functions

User-defined Function

Exercise Function

C - Types of Functions

Storage Class

C - Header Files

C - Preprocessor

C - Pointers

C - Structures

C - Typedef

C - File Handling

Ex: File Handling

Command Line Argument


C - Comments

Comments are the statements which are not executed by the compiler. Comment is useful when a team is building a project it helps other person to understand the code easily.

There are 2 types of comments in C-Language:

  1. // - Single line comments are represented by double forward slash's.
  2. void main(){      
        //printf("First Line");
        printf("Second Line");
        printf("Third Line");
    Second Line
    Third Line

  3. /*...*/ - Multi line comments are represented by slash asterisk. It can occupy many lines of code.
  4. void main(){      
        /*printf("First Line");
        printf("Second Line");*/
        printf("Third Line");
    Third Line

Any number of comments can be placed anywhere in the program.

Compiling and Execution

Once the program has been written it need to be converted into machine language (0 and 1) before the machine can execute it. This conversion is done by compiler. Compiling the program make an EXE file (Executable file). If we copy this file to another machine we can execute it without recompiling it.