Tag Archives: C language

A Generic Quicksort Implementation in C

As assignment for Data Structures and Algorithms course, we had to work with a modified version of the quicksort algorithm. It came obvious that for modifying a qsort you need to implement it It is difficult to find a clear quicksort algorithm implemented, so I wrote it. Here is the generic C implementation of the

Sorting array elements with C language

UPDATE 17:19: it seems that the program I implemented today uses a kind of Bubble Sort algorithm, give it a try, it’s quite interesting! After 3 long days studying C, I think I’ve assimilated a good knowledge base for the incoming semester. So there is a tiny C program that sorts the elements of a

Reflecting while studying C language

Run the following C program ?View Code C#include <stdio.h> #include <string.h> int main (int argc, char const *argv[]){ if(!argv[1]) return 0; int i = strlen(argv[1]); while(i > -1){ printf("%c",argv[1][i]); i–; } printf("\n"); } Using this string as first program parameter: "..eromyna ti ekat t'nac I ?nwod edispu semit ynam os dlrow eht si yhW"