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

 

Operators and Expressions in C

An Operator is a symbol in C language that performs some mathematical, logical, etc. operations on some data. The data

Read More »


Storage Classes in C

A storage class defines the scope (visibility) and life time of variables and/or functions within a C Program. These specifiers

Read More »


Non-Formatted I/O in C

The functions which fall in this category just provide bare bone functionality to read and write a character or string

Read More »


Formatted I/O in C

The functions which fall in this category provide a convenient way to format the input and/or output data as per

Read More »


Input / Output Statements in C

Input/output is used for interfacing with outside world. Every programming language must provide a means to input some data into

Read More »


Simple and Compound Statements in C

A Statement is the smallest standalone element of a programming language which in itself is collection of tokens of the

Read More »


Errors in a C program

Error is a condition either during compilation or execution of a program which if not fixed can halt compilation or

Read More »


Structure of a C program

C is a case sensitive programming language which means in C two variables named x and X will have different

Read More »


User Defined Data Types in C

C language allows a programmer to create user defined data types. It provides 2 keywords to do so; typedef and

Read More »


Initialization of a Variable in C

After a variable is declared it may be required to initialize it. Initialization of a variable means assigning some value

Read More »


Declaration of a Variable in C

All the variables that are to be used in a program must be declared first. The declaration of variable means

Read More »


Character Data Type in C

The Character data type is used to specify a variable that will contain characters from ASCII table like ‘A’, ‘%’,

Read More »


Floating Point Data Type in C

The Floating Point data type is used to specify a variable that will contain real numbers, i.e. any positive or

Read More »


Integer Data Type in C

The Integer data type is used to specify a variable that will contain only integer values, i.e. any positive or

Read More »


Classification of Data Types in C

The wide variety of data types supported by C language can be classified into 3 classes: 1. Primary Data Types

Read More »


« Newer EntriesOlder Entries »