Skip to content

Commit c0796ad

Browse files
colinleachColin Leachryanplusplus
authored
Fix broken links in basics/about.md (#1082)
* Fix broken links in `basics/about.md` * Update concepts/basics/about.md Co-authored-by: Ryan Hartlage <[email protected]> --------- Co-authored-by: Colin Leach <[email protected]> Co-authored-by: Ryan Hartlage <[email protected]>
1 parent 37a5a6e commit c0796ad

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

concepts/basics/about.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# About
22

33
C is a statically typed language, which means that everything has a type at compile-time.
4-
Choosing a name for a [variable][] and setting its type is referred to as declaring a variable.
4+
Choosing a name for a [variable][variable] and setting its type is referred to as declaring a variable.
55

66
A variable is declared by explicitly specifying its type.
77
A variable name [must follow some rules][name-rules] like starting with either a letter or an underscore.
@@ -28,13 +28,13 @@ foo = 25; // Update to new value
2828
foo = false; // Compiler error when assigning value of a different type
2929
```
3030

31-
C is an [imperative][] [procedural][] language.
32-
All computation is carried out as part a series of [statements][] that are part of a [function][] or multiple functions.
31+
C is an [imperative][imperative] [procedural][procedural] language.
32+
All computation is carried out as part a series of [statements][statements] that are part of a [function][function] or multiple functions.
3333

34-
Each function can have zero or more [parameters][].
34+
Each function can have zero or more [parameters][parameters].
3535
When defining a function all parameters, and the return value must be explicitly typed.
3636
Values are returned from functions using the [`return` keyword][return-keyword].
37-
Functions have external [storage class][] by default, meaning that it exists for the lifetime of the program and can be visible externally to the file.
37+
Functions have external [storage class][storage_class] by default, meaning that it exists for the lifetime of the program and can be visible externally to the file.
3838
To prevent this the `static` keyword can be added to specify internal visibility.
3939

4040
```c
@@ -44,7 +44,7 @@ static int add(int x, int y) {
4444
```
4545
4646
In the above example, the variables `x` and `y` can only be used within the function that is, they have function scope.
47-
[Scope][] is the idea that the value associated with a name (of a program element) is only accessible within the code "area" where it is defined.
47+
[Scope][scope] is the idea that the value associated with a name (of a program element) is only accessible within the code "area" where it is defined.
4848
The principal code areas in C are:
4949
5050
- file
@@ -57,7 +57,7 @@ Functions are invoked by specifying the function name and passing arguments for
5757
int sum = add(1, 2);
5858
```
5959

60-
C supports two types of [comments][].
60+
C supports two types of [comments][comments].
6161
Single line comments are preceded by `//` (since C99) and multi-line comments are inserted between `/*` and `*/`.
6262

6363
[variable]: https://www.w3schools.in/c-tutorial/variables/
@@ -73,3 +73,4 @@ Single line comments are preceded by `//` (since C99) and multi-line comments ar
7373
[storage class]: https://www.programiz.com/c-programming/c-storage-class
7474
[scope]: https://www.geeksforgeeks.org/scope-rules-in-c/
7575
[comments]: https://en.wikipedia.org/wiki/Comment_(computer_programming)
76+
[function]: https://en.wikipedia.org/wiki/Function_(computer_programming)

0 commit comments

Comments
 (0)