V
vasudevmukherjee
Hi! Anybody there who can answer me on my following code:
When I try to compile this code, I get message of a missing ']' on the
line 3 i.e. int a[MAX];, why is this happening
Thanks in anticipation.
VASUDEV MUKHERJEE
#include <stdio.h>
#define MAX 9;
int a[MAX];
int rands=9;
int rand()
{
rands=rands*1103515245 +12345;
return (unsigned int) (rands/65536)%32768;
}
main ()
{
int i,t,x,y;
for(i=0; i<MAX;i++)
{
a=rand();
printf("%d\n", a);
}
}
When I try to compile this code, I get message of a missing ']' on the
line 3 i.e. int a[MAX];, why is this happening
Thanks in anticipation.
VASUDEV MUKHERJEE
#include <stdio.h>
#define MAX 9;
int a[MAX];
int rands=9;
int rand()
{
rands=rands*1103515245 +12345;
return (unsigned int) (rands/65536)%32768;
}
main ()
{
int i,t,x,y;
for(i=0; i<MAX;i++)
{
a=rand();
printf("%d\n", a);
}
}