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> #define ROZ 2 int main() { char *napis; int n=0; char a; napis=calloc(ROZ,sizeof(char)); printf("Witam w programie, który dynamicznie wpisuje znaki do tablicy!\n"); do { printf("Podaj znak o indeksie %d\n",n); scanf(" %c",&a); if(n<ROZ) { napis[n]=a; } else if(n>=ROZ) { napis=realloc(napis,(n+1)*sizeof(char)); napis[n]=a; } n++; }while(a!='.'); napis=realloc(napis,(n+1)*sizeof(char)); napis[n]='\0'; printf("|"); for(n=0;napis[n]!='\0';n++) { printf("%c|", napis[n]); } 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