online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <stdio.h> char distinct_or_not_string(char* string); int main() { char str[20]; char result; printf("please enter your string: "); char *p = fgets(str,sizeof str,stdin); if(p == NULL) { printf("Error occurred at reading the scan!"); return 1; } printf("\n"); result = distinct_or_not_string(str); return 0; } char distinct_or_not_string(char *string) { int i=0,j; while(string[i] != '\0') { j=i+1; while(string[j] != '\0') { if(string[i] == string[j]) { printf("false"); return 0; } j++; } i++; } printf("true"); return 1; }

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