Error in C
SofhinWong1 (3)

#include <stdio.h>
#include<string.h>
#include<stdlib.h>

//variable for A1
int menu;
char Name[100];
char Student_ID[100];
char Room[100];
char Bill[100];
int Meal, Gym, Week;

int main(){
printf("1 Room Booking\n2 Room Availability\n3 Payment Details\nPlease enter your option:");
scanf("%i",&menu);
if(menu==1){
A1:
printf("\nPlease enter your name:");
scanf(" %c",&Name);
printf("\nPlease enter your Student ID:");
scanf("%c",& Student_ID);
printf("\n\nPlease choose your gender.\n1 Male\n2 Female");
goto A1;
}
}

When I run the program, it gives me warning.
warning: format specifies type 'char ' but the argument has type 'char ()[100]' [-Wformat]
May I know how to fix it?

You are viewing a single comment. View All
SofhinWong1 (3)

@mwilki7 oh, it works! Thanks so much. %s can read integer and string in one input right?