0

Why is "%s" used in printf function, because I deleted and the output still the same ?

//I think this printf("%s", "Top 10% \n");// is equivalent to printf("Top 10% \n");

28th Jun 2020, 10:28 AM
توفيق عبد الرزاق
توفيق عبد الرزاق - avatar
2 Antworten
+ 2
توفيق عبد الرزاق %s will print up to '\0'. Try below it will not print 'Tempor' because of \0. printf("%s", " Top 10 \0 Tempor");
28th Jun 2020, 10:34 AM
$¢𝐎₹𝔭!𝐨𝓝
$¢𝐎₹𝔭!𝐨𝓝 - avatar