Does anyone know, why a warning come up when I run this?
Warnings are the lines with red color.
How can I fix this warning, please help...
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define MAX 30
int main()
{
int customerCount=0;
char input[32];
char drinks[MAX][10];
char size[MAX][6];
char hotCold[MAX][5];
int i=0;
printf("How many people are at your table?: ");
fgets(input,32,stdin);
sscanf(input,"%d",&customerCount);
if(customerCount==0)
{
printf("END");
exit(0);
/*summary*/
}
printf("Choose what type of drink would you like.\n");
while(strcmp(drinks[i],"None")!=0)
do
{
printf("Coffee, Tea, Cocoa, or Ovaltine?: ");
fgets(input,32,stdin);
sscanf(input,"%s",drinks[i]);
}
while(strlen(drinks[i]==0));
do
{
printf("Small or Large?: ");
fgets(input,32,stdin);
sscanf(input,"%s",size);
}
while(strlen(size==0));
do
{
printf("Hot or Cold?: ");
fgets(input,32,stdin);
sscanf(input,"%s",hotCold);
}
while(strlen(hotCold==0));
}