online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> int main(void) { char *vs[] = {"jfd", "kj", "usjkfhcs", "nbxh", "yt", "muoi", "x", "rexhd"}; int longest, index = 0; /* i is the index for elements in *vs[]. * "jfd" is 0, "kj" is 1... */ for (int i = 0; i < sizeof(*vs); i++) { /* j if the index for string lengths in vs[]. * for "jfd", 'j' is 0, 'f' is 1... */ for (int j = 0; vs[i][j] != '\0'; j++) { /* if j is longer than the previous longest value */ if (j > longest) { longest = j; index = i; } } } printf("Longest string = %s\n", vs[index]); return 0; }

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