Found below from the man page for scanf ,looks like we need to add an extra space .before the format when scanning for characters.Changing this in the code makes the code work correct.
[ c ]--> Matches a sequence of characters whose length is specified by the maximum field width (default 1); the next pointer must be a pointer to char, and
there must be enough room for all the characters (no terminating null byte is added). The usual skip of leading white space is suppressed. To skip white space first, use an explicit space in the format.
Changes:
//size=getchar(); // Commented getchar func call
scanf(" %c",&size); //Added space before the %c in the format specifier
Also last printf in the code requires a small change to print pizza name ,please check