+ 1

Please what those %s mean and how if is used in program C

printf("you entered: %s; , a") puts(a)

11th Jun 2019, 11:19 AM
Haramide Damilola DATABEAM
Haramide Damilola DATABEAM - avatar
2 odpowiedzi
+ 2
Its, printf("you entered:%s:",a); The content of variable "a" will be printed on the output console in the place "%s". In your code, "s" is of string type so " %s" is been used. puts(a) will just print the content of variable "a".
11th Jun 2019, 11:30 AM
Veda Shree S
Veda Shree S - avatar
0
#include <stdio.h> int main() { char a[30]; gets(a); printf("you entered: %s", a); return 0; }
11th Jun 2019, 11:32 AM
Sachin Artani
Sachin Artani - avatar