online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <string.h> #include <stdio.h> #include <stdlib.h> int myCompare (const void * a, const void * b) { const char *pa = *(const char **)a; const char *pb = *(const char **)b; return strcmp(pa, pb); } int main() { const char *input[] = {"a", "orange", "apple", "mobile"}; int stringLen = sizeof(input) / sizeof(char *); int i; for (i = 0; i < stringLen; ++i) { printf("%p: %d: %s\n", input[i], i, input[i]); } printf("\n"); qsort(input, stringLen, sizeof(char *), myCompare); for (i = 0; i < stringLen; ++i) { printf("%p: %d: %s\n", input[i], i, input[i]); } }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue