online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <stdio.h> #include <stdlib.h> #define MAX 10 typedef struct { char data[MAX]; int top; }STACK; STACK s; char ch; void initstack() { s.top = -1; } int isfull() { if(s.top == MAX-1) return 1; else return 0; } int isempty() { if(s.top == -1) return 1; else return 0; } void push(char ch) { if(isfull()) printf(">>STACK IS FULL<<"); else { printf("\tchar=%c",ch); s.top++; s.data[s.top]=ch; printf("\ttop=%d",s.top); } } char pop() { if(isempty()) printf(">>STACK IS EMPTY<<"); else { printf("\n\n pop top=%d",s.top); ch=s.data[s.top]; s.top = s.top -1; return ch; } }

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