Hi friends,

     i am getting un-understandable error like this while copiling c
program in Redhat EL-5. why?

[12ei010@localhost ~]$ cc calloc.c

calloc.c: In function *ΓÇÿmainΓÇÖ:*

calloc.c:8: error: expected *ΓÇÿ;ΓÇÖ* before *ΓÇÿprintfΓÇÖ*

calloc.c:11: error: *ΓÇÿnullΓÇÖ* undeclared (first use in this function)

calloc.c:11: error: (Each undeclared identifier is reported only once

calloc.c:11: error: for each function it appears in.)

calloc.c:18: error: expected *ΓÇÿ;ΓÇÖ* before *ΓÇÿ:ΓÇÖ* token

[12ei010@localhost ~]$ cat calloc.c

#include<stdio.h>

#include<stdlib.h>

int main()

{

int i,n;

int *pointerData;

clrscr()

printf("Enter number of items to be stored: ");

scanf("%d", &i);

pointerData =(int*) calloc(i,sizeof(int));

if(pointerData==null)

exit(1);

for(n=0;n<i;n++)

{

printf("Enter number #%d: ",n);

scanf("%d", &pointerData[n]);

}

printf("You have entered : "):

for (n=0;n<i;n++)

printf ("%d",pointerData[n]);

getch();

return 0;

}

[12ei010@localhost ~]




Thanks and regards,

Samy

9600100357
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to