online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Online C Compiler. Code, Compile, Run and Debug C program online. Write your code in this editor and press "Run" button to compile and execute it. *******************************************************************************/ #include<stdio.h> #include<stdlib.h> #include<string.h> #define MAX_STRING_SIZE 256 #define MAX_TOKEN_SIZE 25 void fun(const char* str) { char* buffer=calloc(MAX_STRING_SIZE,sizeof(char)); char token[MAX_TOKEN_SIZE]; int count=0; int flip=1; while (count<strlen(str)){ sscanf(&str[count], "%[^.]s", token); count+=strlen(token)+1; if(flip){ memcpy(&buffer[strlen(buffer)],token,strlen(token)); sprintf(&buffer[strlen(buffer)], ".abc."); } flip = flip ? 0 : 1; } buffer[strlen(buffer)-1]='\0'; printf("%s",buffer); free(buffer); } int main() { char a[]="hey.whats.that.over.there"; fun(a); 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