C Tutorial

C Programming Tutorial
C Programming Tutorial

Welcome to the C Knowledge Base and Tutorial

Part 1 – Basic knowledge

Part 2 – Decision Control in C

Part 3 – Loop structure

  • Loops
  • The while Loop
  • The for Loop
  • The Odd Loop
  • The break Statement
  • The continue Statement
  • The do-while Loop
  • Summary of loop structure
  • Quiz of loop structure – Test your Skill
  • Examples

Part 4 – The Case Control Structure

  • Decisions Using switch
  • switch and if-else
  • The Goto Keyword
  • Summary of the case control structure
  • Quiz of case control structure
  • Examples

Part 5 – Functions & Pointers

Introduction of function

Why use function

Passing Values between Functions

Scope Rule of Functions

Calling Convention

Advanced Features of Functions

Function Declaration and Prototypes

Call by Value and Call by Reference

Pointers

Recursion

Recursion and Stack

Adding Functions to the Library

Summary of Function and Pointer

Quiz of function and pointer

Part 6 – Arrays

What are Arrays

Array Initialization

Passing Array Elements to a Function

Pointers and Arrays

Passing an Entire Array to a Function

Two Dimensional Arrays

Pointers and 2-Dimensional Arrays

Pointer to an Array

Passing 2-D array to a Function

Array of Pointers

Limitation of Array of Pointers to Strings

Summary of Array

Quiz of Array

Part 7 – Structures

Introduction of Structure

Array of Structures

Uses of Structures

Summary of Structure

Quiz of Structure

part 8 – Console Input/Output

Types of I/O

Formatted Console I/O Functions

sprintf( ) and sscanf( ) Functions

Unformatted Console I/O Functions

Summary of console input output

Quiz of console input output

part 9 – File Input/Output

  • Data Organization
  • File Operations
    • Opening a File
    • Reading from a File
    • Trouble in Opening a File
    • Closing the File
  • Counting Characters, Tabs, Spaces
  • A File-copy Program
    • Writing to a File
  • File Opening Modes
  • String (line) I/O in Files
  • Record I/O in Files
  • Text Files and Binary Files
  • Database Management
  • Low Level Disk I/O
    • A Low Level File-copy Program
  • I/O Under Windows
  • Summary of  File Input/Output
  • Quiz of File Input/Output

 

Structures & Unions in C

Arrays provide a mechanism to declare a derived data type which is a collection of homogenous elements. This means each

Read More »


Multi-Dimensional Array in C

C does not have true multidimensional arrays. However, because of the generality of C’s type system; we can have arrays

Read More »


Two-Dimensional Array in C

The array which is used to represent and store data in a tabular form is called as Two Dimensional Array.

Read More »


One Dimensional Array in C

The array which is used to represent and store data in a linear form is called as Single or One

Read More »


Concept of Array in C

In C programming language, a derived data type which can store a collection of elements of the same data type

Read More »


Arrays in C

Imagine that you have to store and later retrieve the unique ID of all of the registered voters in your

Read More »


Breaking Nested Loops in C

It is sometimes required to break from the inner loop of nested loops. In this a break statement can be

Read More »


Nesting of Looping Statements in C

Nesting loops means placing one loop inside the body of another loop. Any variant of loop can be nested inside

Read More »


Nesting of Decision Making Statements in C

Nesting if statement means placing if statement inside another if statement. The general syntax of nesting if statement is as

Read More »


Control Flow - Nesting in C

There may be a situation when you want to check for another condition within the body if or if-else statement.

Read More »


goto Statement in C

The goto statement is used to unconditionally transfer the control to any location within the program whose address in the

Read More »


continue Statement in C

The continue statement when encountered, transfers the control to the condition of the while loop or counter-modification statement of for

Read More »


break Statement in C

The break statement is used to break the execution of body of loop. When this statement is encountered, the control

Read More »


for Statement in C

The for loop is an entry-controlled loop (like while) in which first the condition is checked, and if it is

Read More »


do while Statement in C

The do-while loop is an exit-controlled loop in which first the body of a loop is executed and then the

Read More »


« Newer EntriesOlder Entries »