Run time Error in C Program

I am trying to run this program But don’t know that why I am getting Error at run time:

#include<stdio.h>
int main()
{
int i,n,a[10000],b[10000],flag,index;
while(1)
{
scanf("%d",&n);
if(n==0) break;
flag=0;
for(i=0;i<n;i++)
{
scanf("%d",&a*);
index=a*-1;
b[index]=i+1;
}
for(i=0;i<n;i++)
{
if(a*!=b*) flag++;
}
if(flag==0)
printf("ambiguous
");
else
printf("not ambiguous
");
}
return(0);
}****

Your cause is probably not improved by an apparently advertising link at the bottom of your post (I don’t know - I
didn’t click it). I’m posting this response with the primary intent of discouraging others from clicking on it. If you
are unable to demonstrate that advertising was the primary goal of the post, then I will report it to the moderators,
otherwise let’s assume for a moment this isn’t the case:

It doesn’t affect me (or anyone else with monospaced NNTP clients), but you should surround your code with code tags to
make it readable to others (iconified by octothorpes in the toolbar) and you might enjoy a better response. I cannot
reproduce a runtime error after compiling and running your code and entering values for n and a. I suspect it depends
what values you enter during the scanf reads. I suppose the problem is that I’ve no idea what you are trying to achieve
with your code.

As flymail already told you.

I removed the link, giving you the benifit of the doubt.

Please use CODE tags round all computer texts. Click the #button in the toolbar above the post editor and copy/paste diret from the terminal window in between the tags.

As we are mere fellow openSUSE users, we do not have any education into mind reading. Thus please do tell out of your own what you use (like version of openSUSE, maybe which desktop environment when applicable) and show, show, show. Not only the text of your program, but also the execution. We can not guess what you do or what you see or what the exact error message is.

On 2013-04-11 11:46, hcvv wrote:
>
> As flymail already told you.
>
> I removed the link, giving you the benifit of the doubt.

I had a quick look using links. It appears to be a training site on
India, thus he is asking us about his exercises instead of his teachers
(I assume a training site has trainers).

> Please use CODE tags round all computer texts. Click the #button in the
> toolbar above the post editor and copy/paste diret from the terminal
> window in between the tags.

Indeed.

Tabulation is completely lost here, and there is no explanation of what
the code should do. Plus sample inputs that produce whatever error, and
a printout of a run with the error message - all inside code tags.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)