You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: style/c.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -158,7 +158,7 @@ Notice how:
158
158
159
159
## Functions
160
160
161
-
In accordance with [C99](http://en.wikipedia.org/wiki/C99), be sure to declare `main` with:
161
+
In accordance with [C11](https://en.wikipedia.org/wiki/C11_(C_standard_revision)), be sure to declare `main` with:
162
162
163
163
```c
164
164
intmain(void)
@@ -227,7 +227,7 @@ As for your own functions, be sure to define them similarly, with each curly bra
227
227
228
228
## Indentation
229
229
230
-
Indent your code four spaces at a time to make clear which blocks of code are inside of others. If you use your keyboard's Tab key to do so, be sure that your text editor's configured to convert tabs (`\t`) to four spaces, else your code may not print or display properly on someone else's computer, since `\t` renders differently in different editors. (If using [CS50 IDE](https://ide.cs50.io/), it's fine to use Tab for indentation, rather than hitting your keyboard's space bar repeatedly, since we've preconfigured it to convert `\t` to four spaces.)
230
+
Indent your code four spaces at a time to make clear which blocks of code are inside of others. If you use your keyboard's Tab key to do so, be sure that your text editor's configured to convert tabs (`\t`) to four spaces, else your code may not print or display properly on someone else's computer, since `\t` renders differently in different editors. (If using [cs50.dev](https://cs50.dev/), it's fine to use Tab for indentation, rather than hitting your keyboard's space bar repeatedly, since we've preconfigured it to convert `\t` to four spaces.)
231
231
232
232
Here's some nicely indented code:
233
233
@@ -318,7 +318,7 @@ int* p;
318
318
319
319
## Variables
320
320
321
-
Because CS50 uses [C99](http://en.wikipedia.org/wiki/C99), do not define all of your variables at the very top of your functions but, rather, when and where you actually need them. Moreover, scope your variables as tightly as possible. For instance, if `i` is only needed for the sake of a loop, declare `i` within the loop itself:
321
+
Because CS50 uses [C11](https://en.wikipedia.org/wiki/C11_(C_standard_revision)), do not define all of your variables at the very top of your functions but, rather, when and where you actually need them. Moreover, scope your variables as tightly as possible. For instance, if `i` is only needed for the sake of a loop, declare `i` within the loop itself:
0 commit comments