C Tutorial

Define C

Define Programming

Programming Approach

First C Program

TurboC Shortcut keys

Compiler vs Interpreter

C Variable

C Keywords

C Data Types

C Comments

C Operators

Hierarchy of Operators

Ex: Arithmetic Operator

C Formatting Output

C Escape Sequence

C if statement

Ex: If statement

C Switch statement

Ex: Switch

Increment / Decrement

C Loops

Ex: Loops

C Nesting Of Loops

Ex: Nested Loops

C Jumping Statements

C Exit(), Gotoxy()

C Arrays 1D

Ex: Arrays 1D

C Arrays 2D

Ex: Arrays 2D

C Sorting

ASCII Value

Character I/O Function

Ex: Character

C String Functions

Ex: Strings

Array of Strings

C Math Functions

User-defined Function

Exercise Function

Local, Reference variable

Function Calling types

Array Passing Function

Recursion Function

Ex: Recursion Function

Constant Variable

Storage Class

C Header Files

C Preprocessor

C Pointers

Pointer to Pointer

C Structures

Exercise Structure

C Typedef

C Enumeration

C File Handling

Ex: File Handling

Command Line Argument

MCQ

Question-Answer

Page Stats

Visitor: 791

C-Language Sorting

Sorting is technique which is used to arrange the data in a particular order, either ascending or descending order. In C-Language, there are 3 types of sorting techniques i.e. Bubble Sort, Selection Sort, Insertion Sort.

Bubble Sort

1. Bubble Sort - It starts comparing numbers from starting till end of the list and place a largest number in the end in the 1st pass.

Bubble Sort

Selection Sort

2. Selection Sort - It starts comparing numbers from top and place a smallest number in starting in 1st pass.

Selection Sort

Insertion Sort

3. Insertion Sort- It starts comparing numbers from 1st index to top of the list and insert the number at its sorted position.

Insertion Sort

Exercise Question on Sorting

  1. WAP to input 5 numbers in 2 different arrays and Merge it in sorted order. Assuming that input numbers are not in sorted order.
Updated: 2-Dec-19