/** Program Name: Selection Sort Description: This Program sort a given array elements, using Selection Sort Algorithm Author: Tauqirul Haque */ #include <conio.h> #include <stdio.h> #define MAX 5 void selectionSort(int *, int ); void display(int *); void main() { int array[MAX] = { 35,56,23,11,46 }; printf("\nThe Array Before Sortint .... \n"); display(array); selectionSort(array,MAX); printf("\n\nThe Array After Sorting .. \n"); display(array); } void selectionSort(int *array, int array_size) { int i, j; int min, temp; for (i = 0; i < ar...
/** Program Name: Swap Two Numbers Description: This Program swaps two number, using XOR Author: Tauqirul Haque */ #include <stdio.h> #include <conio.h> int main() { int firstNumber, secondNumber; printf("Enter The First Number : "); scanf("%d",&firstNumber); printf("\nEnter The Second Number : "); scanf("%d",&secondNumber); printf("\n\nNumbers Before Swapping : %d <-> %d \n",firstNumber, secondNumber); firstNumber = firstNumber^secondNumber; secondNumber = firstNumber^secondNumber; firstNumber = firstNumber^secondNumber; printf("\nNumbers After Swapping : ...