I am very new in C, I am currently just trying to read a file with the contents "6" and nothing else. Whenever I run the file, I get: Bus Error:10.
#include <stdio.h>
#include <stdlib.h>
char input(void);
int main(int argc, char** argv)
{
input();
return (EXIT_SUCCESS);
}
char input(void)
{
FILE *fp;
char *score;
fp = fopen("data.bin", "rt");
fscanf(fp,"%s", score);
printf("%s", score);
fclose(fp);
}