online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl, C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ #include <stdio.h> #define CREATE_READ_FUNCTIONS(TYPE, SCAN)\ int read_##TYPE(TYPE *data, int size)\ {\ if (data == NULL || size <= 0) return 1;\ int i, x;\ printf("Podaj dane : \n");\ for(i=0; i < size; i++)\ {\ x = scanf(SCAN, data + i);\ if (x==0)\ {\ return 2;\ }\ }\ return 0;\ } CREATE_READ_FUNCTIONS(int, "%d") int main() { int size = 5; int *tab = malloc(size * sizeof(int)); printf("read_int returned:%d", read_int(tab, size)); 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