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

 

C program to print diamond pattern

C program to print diamond pattern #include <stdio.h> int main() { int i, j, rows, space = 1; printf(“Please enter

Read More »


C Program to convert uppercase string to lowercase string

C Program to convert uppercase string to lowercase string Program Logic: The logic we have used in the program is:

Read More »


C Program to Print names of all Files present in a Directory

C Program to Print names of all Files present in a Directory dirent.h header file contains variables and functions related to

Read More »


C Program to Reverse a String using Pointer

C Program to Reverse a String using Pointer #include <stdio.h> int main() { printf("\n\n\t\tEduguru - C Program Example\n\n\n"); char str[100];

Read More »


C Program to Swap Two Numbers using Pointers

C Program to Swap Two Numbers using Pointers #include<stdio.h> int main() { printf("\n\n\t\tEduguru - C Program Example\n\n\n"); int a, b;

Read More »


C Program for Dynamic Memory Allocation using malloc()

C Program for Dynamic Memory Allocation using malloc() Below is a program on dynamic memory allocation using malloc() and clearing out memory

Read More »


Basic C Program for Pointers

Basic C Program for Pointers #include <stdio.h> int main() { printf("\n\n\t\tEduguru - C program example\n\n\n"); int var = 24; //

Read More »


C Program to find Deteminant of 2x2 Matrix

C Program to find Deteminant of 2×2 Matrix #include<stdio.h> int main() { printf("\n\n\t\tEduguru - C Program example\n\n\n"); int a[2][2], i,

Read More »


C Program to perform addition and subtraction of Matrices

C Program to perform addition and subtraction of Matrices #include<stdio.h> int main() { printf("\n\n\t\Eduguru- C Program example\n\n\n"); int n, m,

Read More »


C Program to check whether a two dimensional array is a Sparse Matrix

C Program to check whether a two dimensional array is a Sparse Matrix A Sparse Matrix is a matrix(two-dimensional array)

Read More »


Simple Program to remove Duplicate Element in an Array

Simple Program to remove Duplicate Element in an Array   #include<stdio.h> #include<conio.h> void main() { int a[20], i, j, k,

Read More »


C Program example to Find Quotient and Remainder

C Program example to Find Quotient and Remainder #include<stdio.h> int main() { printf("\n\n\t\tEduguru - C prgram example\n\n\n"); int c, d,

Read More »


C Program to find the Sum of First n Natural numbers using for loop

C Program to find the Sum of First n Natural numbers using for loop   #include <stdio.h> int main() {

Read More »


C Program to print the Multiplication Table of any Number

C Program to print the Multiplication Table of any Number #include<stdio.h> int main() { printf("\n\n\t\tEduguru - C Program Example\n\n\n"); int

Read More »


Program to check if input Number is int or float

Program to check if input Number is int or float #include<stdio.h> #include<conio.h> #include<string.h> int main() { printf("\n\n\t\tEduguru - C Program

Read More »


« Newer EntriesOlder Entries »
  • sultan69
  • panen99
  • sultan69
  • panen4d
  • panen4d
  • panen4d
  • panen4d
  • panen4d
  • panen4d
  • panen4d
  • panen4d