im having trouble trying to get fgets and sscanf to work. im getting a segmentation fault right at the sscanf line of this code... can anyone tell me the reason?
Code:
int main() {
int integ;
char line[400];
printf("Enter an integer: ");
fgets(line, sizeof(line), stdin);
sscanf(line,"%d",&integ);
printf("%d",&integ);
return 0;
}
NEVERMID, FOUND MY PROBLEM, PLEASE REMOVE!!