online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { char tab[1001],*tab1[1000]; fgets(tab,1001,stdin); tab[strlen(tab)-1]='\0'; char *token=strtok(tab," "); unsigned i=0,max=0,lw=0; while(token) { tab1[i]=token; token=strtok(NULL," "); i++; } for(i=0;i<strlen(*tab1);i++) { if(strlen(tab1[i])>max) { max=strlen(tab1[i]); } } for(i=0;i<strlen(*tab1);i++) { if(strlen(tab1[i])==max) { lw++; } } printf("%d %d\n",lw,max); for(i=0;i<strlen(*tab1);i++) { if(strlen(tab1[i])==max) { printf("%s\n",tab1[i]); } } 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