C Tutorial

C Programming 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

 

The Format of C

Statements are terminated with semicolons. Indentation is ignored by the compiler. C is case sensitive – all keywords and Standard. […]

Read More »


Merits of C Programming

1. C is a general purpose programming language. You can generate games, business software, utilities, mathematical models, word processors, spreadsheets […]

Read More »


difference between an Assembler and a Compiler?

Compiler is a computer program that reads a program written in one language and translates it in to another language, […]

Read More »


Features of C Language

Simple Machine Independent or Portable Mid-level programming language structured programming language Rich Library Memory Management Fast Speed Pointers Recursion Extensible […]

Read More »


A Brief History of UNIX and C

The first UNIX implementation was developed in 1969 (the same year that Linus Torvalds was born) by Ken Thompson at […]

Read More »


a program to read the data for the customer, calculate the interest and service charge, and print the customer’s name, average balance, interest, and service charge.

//calculate interest and service charge for bank customer #include <stdio.h> int main() { char customer[30], acctNum[30]; double avgBalance, interest, service; […]

Read More »


Escape Sequences

Within the string argument to printf, the backslash (\) signals that a special effect is needed at this point. The […]

Read More »


how to run C Program in ubuntu

Step 1. Open text editor. Step 2. Write a Program. Step 3. Save the program with the extension .C . […]

Read More »


Arrays of Structures & Unions in C

Since structures are data types that are especially useful for creating collection items, why not make a collection of them […]

Read More »


Union: Accessing Union Members & Nesting in C

To access union members we can use dot operator (.) between union variable and union member name as follows: <Union-Variable-Name>.<MemberAddress> […]

Read More »


Union: Definition, Declaration & Initialization in C

Union, is a collection of variables of different types, just like a structure, however a union can only store information […]

Read More »


Nesting of Structures in C

A Structure can contain other Structure variables as members. This is called Nesting of Structures. For example address structure is […]

Read More »


Initialization & Accessing Structure Members in C

C programming language treats a structure as a user-defined data type; therefore you can initialize a structure like a variable. […]

Read More »


Structure Declaration in C

The first way is to declare a structure variable immediately after the structure definition, as follows: struct address { int […]

Read More »


Structure Definition - C Programming

In some programming contexts, you need to access multiple data types under a single name for easier data manipulation; for […]

Read More »


Older Entries »