Link to home
Start Free TrialLog in
Avatar of Mick Barry
Mick BarryFlag for Australia

asked on

Errors

Can someone quickly fix the errors in the following for me:


typedef unsigned int size_t;
typedef struct {
int      _file;                  int      _flag;                  unsigned _bufsiz;            char      *_ptr;                  int      _cnt;                  char      *_base;            } FILE;
extern      FILE _files[32];
FILE *fopen(char *name, char *mode);
int   fclose(FILE *fp);
int   fread(void *buf, int sizelem, int n, FILE *fp);
int   fwrite(void *buffer,int sizelem, int n,FILE *fp);
int   feof(FILE *fp);
int   ferror(FILE *fp);
int   fflush(FILE *fp);
void  clearerr(FILE *fp);
int   fseek(FILE *fp,long offset,int origin);
long  ftell(FILE *fp);
int   fscanf(FILE *fp,char *format,...);
int   scanf(char *format,...);
int   sscanf(char *buf, char *fmt, ...);
int   fprintf(FILE *fp, char *fmt, ...);
int   printf(char *fmt, ...);
int   sprintf(char *buf, char *fmt, ...);
int   vsprintf(char *buf, char *fmt, char *args);
int   fgetc(FILE *fp);
char *fgets(char *buf, int n, FILE *fp);
int   getc(FILE *fp);
int   getchar();
char *gets(char *buf);
int   ungetc(int c, FILE *fp);
int   fputc(int c, FILE *fp);
int   fputs(char *str, FILE *fp);
int   putc(int c, FILE *fp);
int   putchar(int c);
int   puts(char *str);
int main(void)
{
printf("%d = in us dollars"\n);
printf("%d australian = 0.701740 %f usd"\n);
printf("what amount is austrailia"\n);
printf("%d jamaican = 60.0500 %f usd"\n);
printf("what amount is jamaican"\n);
printf("%d african = 545.872 %f usd"\n);
printf("what amount is african franc"; \n)
printf("%d bahamas = 1.00000 %f usd"\n);
printf("what amount is bahamas"\n);
printf("%d germany = 0.832159 %f usd"\n);
printf("what amount is germany"\n);
printf("rates as of august"\n);  
return 0;
SOLUTION
Avatar of avizit
avizit

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of sunnycoder
sunnycoder
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What is the problem statement?

-ssnkumar
Avatar of lwinkenb
lwinkenb

I think sunny missed some commas in his printf examples.
printf("%d germany = 0.832159 %f usd\n"1,0.5);
should be
printf("%d germany = 0.832159 %f usd\n",1,0.5);
(notice the comma after the second pair of quotes).


SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mick Barry

ASKER

Thanks people, and apologises for my laziness :)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I've lot all I need, thanks all :)
for the umpteenth time ;o)

*dont* use gets ... use fgets instead ....