code is running on codeblocks but i'm getting run time error on SPOJ compiler
**#include<iostream>**
**#include<string.h>**
**using namespace std;**
**main()**
**{**
** int t,top,topp,i;**
** char a[401],post[401],stak[10];**
** cin>>t;**
** for(i=0;i<t;i++)**
** {**
** cin>>a;**
** int j=0;**
** topp=0;**
** top=-1;**
** while(a[j]!=NULL)**
** {**
** **
** if(a[j]=='+' || a[j]=='-' || a[j]=='*' || a[j]=='/' || a[j]=='^' || a[j]=='(')**
** stak[++top]=a[j];**
** else if(a[j]==')')**
** {**
** while(1)**
** {**
** if(stak[top]=='(')**
** {**
** top--;**
** break;**
** }**
** else**
** {**
** post[topp++]=stak[top];**
** top--;**
** }**
** }**
** }**
** else**
** post[topp++]=a[j];**
** j++;**
** }**
** post[topp]=NULL;**
** cout<<"\n"<<post;**
** }**
**}**