Content deleted Content added
Archiving 1 discussion(s) from Talk:C (programming language)) (bot |
m Archiving 1 discussion(s) from Talk:C (programming language)) (bot |
||
Line 8:
:* They are not irrelevant, and both are already mentioned in the first paragraph of the ''Data Types'' section. This article is already quite long for wikipedia ([[WP:TOOLONG]]), repeating information is not an improvement. Your tutorial-like sections on basic types only made the article less readable. The article should not be a language tutorial ([[WP:NOTTEXTBOOK]]). [[User:Fbergo|Fbergo]] ([[User talk:Fbergo|talk]]) 14:39, 12 December 2019 (UTC)
== Assuming incorrect use of print formatted in an example ==
Based on https://en.wikipedia.org/wiki/Talk:C_(programming_language)/Archive_8#%22Hello,_world%22_example as referenced in the current page (https://en.wikipedia.org/w/index.php?title=C_(programming_language)&diff=930286305&oldid=930286262) as:
<nowiki>
<!-- READ THIS BEFORE YOU EDIT! If you think there is a better way, first see talk page archive No. 8 for why. If you still want to change it, discuss it first.
-->
</nowiki>
<syntaxhighlight lang="c">
#include <stdio.h>
int main(void)
{
printf("hello, world\n");
}
</syntaxhighlight>
Looks like wrong use of pritnf where
print formatted (printf) is designed to work with a provided format as referenced on https://en.wikipedia.org/wiki/Printf_format_string#Syntax meaning that the correct code should look like:
<syntaxhighlight lang="c">
#include <stdio.h>
int main(void)
{
printf("%s\n", "Hello world");
// ^^^^^^ - Notice format string for printf used
}
</syntaxhighlight>
This should be updated for all printf mensions in this article.
--[[User:Kreyren|Kreyren]] ([[User talk:Kreyren|talk]]) 23:19, 11 December 2019 (UTC)
:A printf format string need not have parameter format specifications. Adding them where not needed is distracting to the reader. --[[User:A D Monroe III|A D Monroe III]]<sup>([[User talk:A D Monroe III#top|talk]])</sup> 00:56, 26 June 2020 (UTC)
|