Commit Graph

145 Commits

Author SHA1 Message Date
Divay Prakash
4311e38667 Make description of static keyword stronger, closes #2848 2018-10-09 23:10:17 +05:30
Divay Prakash
70f896eed7 Fix printf, closes #2730 2018-09-13 00:18:37 +05:30
Dragos B. Chirila
5a78f9b3fc Add C99 comments, fix some typos and add clarifications in 'c.html.markdown' 2018-09-04 17:24:42 +02:00
Yoav
f1cc661f50
Update c.html.markdown 2018-03-25 18:04:53 +03:00
0x6a6f7368
81a637e1dd
Update c.html.markdown
How to get information on compiler flags.
2018-01-04 00:15:28 -05:00
0x6a6f7368
95d41ddf6c
Update c.html.markdown
Fixed and improved compiler flag default recommendations.
2018-01-04 00:06:44 -05:00
Jakob Rieck
8f990317b7 [c/en] Correct off-by-one error 2017-09-25 16:12:53 +02:00
Adam Bard
33d6dce8ba Update c.html.markdown
Fix presence of bool (Fixes #2854)
2017-09-12 22:43:55 -07:00
Adam Bard
a5c23e8af4 Update c.html.markdown
Note on macro hygiene. Fixes #2853
2017-09-12 22:42:18 -07:00
Adam Bard
a6e460618d Update c.html.markdown
Fixes #2846, #2849, #2851, #2852 (Thanks to @noncombatant)
2017-09-12 22:32:41 -07:00
HairyFotr
985d23a52b
Fix a bunch of typos 2017-08-23 10:14:39 +02:00
Aaroh Mankad
bea057020f [c/en-en] Make reference link in footer/summary link to Stack Overflow article (#2739)
* Make reference link in footer/summary link to Stack Overflow article

* remove name from list of contributors
2017-05-26 20:02:32 +00:00
Tyler Chong
98f213bc68 Update c.html.markdown (#2734) 2017-05-23 10:37:46 +02:00
Louis-Philippe Asselin
cc782a7cf2 fix further reading url (#2655)
Original link displays "This file has moved to process/coding-style.rst"
2017-02-12 19:33:22 +01:00
George Gognadze
b95bbd93f0 C/en typo, formatting fixes (#2537)
Space should be removed.
Before:
  // Access struct members with .
After:
  // Access struct members with.
C should be capitalized.
Before:
  // there is no Boolean type in c. We use ints instead.
After:
  // there is no Boolean type in C. We use ints instead.
Before:
Header files are an important part of c as they allow for the connection of c
After:
Header files are an important part of C as they allow for the connection of C
Before:
Header files are syntactically similar to c source files but reside in ".h"
After:
Header files are syntactically similar to C source files but reside in ".h"
Before:
files. They can be included in your c source file by using the precompiler
After:
files. They can be included in your C source file by using the precompiler
Before:
as the c file.
After:
as the C file.
Before:
/* should instead be put in a c file.                                       */
After:
/* should instead be put in a C file.                                       */
Before:
/* Beyond the above elements, other definitions should be left to a c source */
After:
/* Beyond the above elements, other definitions should be left to a C source */
Before:
/* a header file but instead put into separate headers or a c file.          */
After:
/* a header file but instead put into separate headers or a C file.          */
2016-10-31 00:35:31 +01:00
Subhrajyoti Sen
4dee8dd033 Update c.html.markdown (#2385) 2016-09-27 21:55:01 +02:00
Jakukyo Friel
c8fb84cc91 c: init array with string literals not introduced. (#2369)
* c: fix using pointer before introduced.

* c: init array with string literals not introduced.

To avoid using the concept pointer before it has been introduced,
previously it is changed to array.
But as @geoffliu pointed out,
array initialization using string literals is not introduced either.
So this commit uses neither pointer nor array.
Discussing `i++` and `++i` does not need to involve pointer or array.

* c: use `var = value` instead of `->`.

`->` is typically used for functions.
Thanks, @vendethiel.
2016-09-13 14:14:28 +02:00
Ryan
21c4be4779 Remove undefined behavior (#2332) 2016-08-17 21:25:32 +02:00
Michal Jurosz
02db6f2bfc Fix c - the first character of ILoveC is I not i (#2253) 2016-05-12 10:15:30 +02:00
Ryan Rauschenberg
7b78232897 issue 2205: Change variable 'size' to 'array_size' 2016-03-22 11:15:26 -04:00
Divay Prakash
f29bc25027 fixed 2016-03-12 13:39:06 +05:30
Divay Prakash
bb74c468c2 fixed whitespaces
removed whitespaces all over document
2016-03-03 11:41:52 +05:30
Jacob Ward
6981980ad5 [c/en] typos 2016-02-18 13:02:55 -07:00
George Gognadze
7560ea8199 typo
some type mistakes.
It is: syntaxtically
It should be: syntactically
It is: iLoveC
Better: ILoveC
It is: passed to ≈the function
It should be: passed to the function
It is: error
It should be: Error
2015-12-24 23:24:09 +04:00
Geoff Liu
6eeb1f962e Merge pull request #1872 from luehm/c_cases
[C/en] Added tidbit about fall-though in switch statements.
2015-12-18 17:22:50 -05:00
Alex Luehm
3b1940b9cc [C/en] Added tidbit about fall-though in switch statements.
Another pitfall, as not all languages have fall-through in switches.
2015-10-28 17:45:31 -05:00
Jody Leonard
b31fda3a8e Edit variable-length array example
The current example seems to be trying to set a size for a char buffer,
use fgets to populate that buffer, and then use strtoul to convert the
char content to an unsigned integer. However, this doesn't work as
intended (in fact, it results in printing "sizeof array = 0"), and so
adapt to a simpler fscanf example. Also remove some ambiguous language
in the example output.
2015-10-26 19:38:36 -04:00
Brendan Batliner
36fe7e1cce Added example of printIntArray in C 2015-10-15 16:38:42 -05:00
Brendan Batliner
2acf7822bd Update c.html.markdown
Added additional info on dynamically allocated arrays in C.
2015-10-15 16:34:53 -05:00
Zachary Ferguson
8417366a1b Cleaned up c file 2015-10-15 14:50:20 -04:00
Zachary Ferguson
65bb71f4bd Merge remote-tracking branch 'refs/remotes/adambard/master'
Conflicts:
	c.html.markdown
2015-10-15 14:48:59 -04:00
Levi Bostian
063c962254 Merge pull request #1512 from awalGarg/patch-2
[c/en] clarify common tripping point of newbies
2015-10-15 13:01:15 -05:00
Levi Bostian
c1982009c7 Merge pull request #1511 from awalGarg/patch-1
[c/en] clarify that args' names are not required in proto
2015-10-15 13:00:53 -05:00
ven
adc81a0bc5 Merge pull request #1480 from eltonvs/master
Translation fixes and extra information
2015-10-15 09:09:40 +02:00
Zachary Ferguson
27bb1a1e80 Removed separate code section
Removed the separate code section for header files
2015-10-14 21:59:42 -04:00
Elton Viana
328ceb1a94 Some extra information 2015-10-14 21:44:42 -03:00
Awal Garg
4599cd319f [c/en] clarify common tripping point of newbies
int foo () {
  printf("bar\n");
  int x; // this is not valid in C89+
}
2015-10-14 20:44:45 +05:30
Awal Garg
223c8140a0 clarify that args' names are not required in proto
with obligatory conventional warning
2015-10-14 20:41:36 +05:30
Zachary Ferguson
79ced08e09 Added Header title
+ Added a header file title
* Changed ```c to ```h
2015-10-13 11:05:20 -04:00
Levi Bostian
841f4c3d46 Merge pull request #1399 from himanshu81494/master
example function added for call by reference
2015-10-12 23:14:27 -05:00
Zachary Ferguson
e418849d76 [c/en] Added a section for header files.
Added a section for header files.
Included a discussion of what belongs in a header file and what does
not.
2015-10-09 11:52:08 -04:00
himanshu81494
c899b6605e Update c.html.markdown 2015-10-09 20:59:05 +05:30
Andy B
e8e8b9c76f [C/en] Accessing command line arguments in main 2015-10-09 15:48:21 +01:00
himanshu81494
e8248af134 Update c.html.markdown 2015-10-08 15:31:40 +05:30
himanshu81494
626ee03fc3 Update c.html.markdown 2015-10-08 14:45:16 +05:30
himanshu81494
9796759379 Update c.html.markdown 2015-10-08 14:44:10 +05:30
Zachary Ferguson
3c02fdb8e4 Revert "[c/en] Added a section for header files."
This reverts commit e1ac6209a8.
2015-10-07 23:49:46 -04:00
Zachary Ferguson
e1ac6209a8 [c/en] Added a section for header files.
Added a section for header files.
Included a discussion of what belongs in a header file and what does
not.
2015-10-07 23:45:01 -04:00
Pushkar Sharma
2e987df422 replaced scanf with fscanf. 2015-10-05 00:52:47 +05:30
Pushkar Sharma
c7e552c448 Variable size array, user size input added. #1170
Fixed Issue #1170
Variable size array, user size input added.
2015-10-04 10:34:31 +05:30