+ 3
String format specifier in ' C '?
As we know all the data types have their format specifiers (e.g. int: %d etc.) But string is not a data type, still why it has the format specifier as %s in C?
1 Réponse
0
for character(char) the format specifier is %c, there is no datatype called string in C.A string simply is an array of characters, ending with a null byte, we have to use array of characters, We will use %s as format specifier when it is string