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

 

while Statement in C

The while-loop is an entry-controlled loop in which first the condition is checked, and if it is True then the

Read More »


Control Flow - Looping in C

Looping flow control statements in C programming language execute a specific set of statements multiple times as long as some

Read More »


switch case Statement in C

switch case statement is another control flow decision making statement supported by C programming language. The general syntax of switch

Read More »


if...else if Ladder in C

if…else if ladder is another extension of if statement supported by C programming language. if statement checks a single condition

Read More »


if...else Statement in C

if…else statement is an extension of if statement supported by C language. The statement is a two-way decision making statement

Read More »


if Statement in C

if statement is one of the basic and primitive decision making statement supported by C language. The general syntax of

Read More »


Types of Flow Control Statements in C

In general, C language supports 2 types of flow control statements: 1. Decision Making 2. Looping Decision Making statements are

Read More »


Control Flow – Decision Making in C

Control Flow (or flow of control) refers to the order in which the individual statements of a program are executed.

Read More »


Type Conversions in Expressions in C

C expressions may contain many variables and constants which may be having different data types. However, when they are evaluated

Read More »


Miscellaneous Operators in C

C language some non-conventional operators like ternary conditional operator (?:), sizeof operator, comma operator (,), pointer operators (& and *)

Read More »


Assignment Operators in C

C language provides one main assignment operator (=) which assigns to a variable on its LHS the outcome of some

Read More »


Bitwise Operators in C

C language provides six bitwise operators which for manipulation of data at bit level. These operators are used to perform

Read More »


Logical Operators in C

C language provides three logical operators which include the logical AND (&&), logical OR (||) and logical NOT (!) operator.

Read More »


Relational Operators in C

C language provides six relational operators which include the greater than (>), greater or equal (>=), lesser than (<), lesser

Read More »


Arithmetic Operators in C

C language provides five main arithmetic operators which include the addition (+), subtraction (-), multiplication (*) and division (/) operator.

Read More »


« Newer EntriesOlder Entries »