From 77541fd4bce5cc90a4cc1a1f1fea47333c4f8897 Mon Sep 17 00:00:00 2001 From: Colin Leach Date: Thu, 14 Aug 2025 14:57:45 -0700 Subject: [PATCH 1/2] Fix broken links in `basics/about.md` --- concepts/basics/about.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/concepts/basics/about.md b/concepts/basics/about.md index 7ba243a7d..ef7ee14e1 100644 --- a/concepts/basics/about.md +++ b/concepts/basics/about.md @@ -1,7 +1,7 @@ # About C is a statically typed language, which means that everything has a type at compile-time. -Choosing a name for a [variable][] and setting its type is referred to as declaring a variable. +Choosing a name for a [variable][variable] and setting its type is referred to as declaring a variable. A variable is declared by explicitly specifying its type. 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 foo = false; // Compiler error when assigning value of a different type ``` -C is an [imperative][] [procedural][] language. -All computation is carried out as part a series of [statements][] that are part of a [function][] or multiple functions. +C is an [imperative][imperative] [procedural][procedural] language. +All computation is carried out as part a series of [statements][statements] that are part of a [function][function] or multiple functions. -Each function can have zero or more [parameters][]. +Each function can have zero or more [parameters][parameters]. When defining a function all parameters, and the return value must be explicitly typed. Values are returned from functions using the [`return` keyword][return-keyword]. -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. +Functions have external [storage class][storage] by default, meaning that it exists for the lifetime of the program and can be visible externally to the file. To prevent this the `static` keyword can be added to specify internal visibility. ```c @@ -44,7 +44,7 @@ static int add(int x, int y) { ``` In the above example, the variables `x` and `y` can only be used within the function that is, they have function 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. +[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. The principal code areas in C are: - file @@ -57,7 +57,7 @@ Functions are invoked by specifying the function name and passing arguments for int sum = add(1, 2); ``` -C supports two types of [comments][]. +C supports two types of [comments][comments]. Single line comments are preceded by `//` (since C99) and multi-line comments are inserted between `/*` and `*/`. [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 [storage class]: https://www.programiz.com/c-programming/c-storage-class [scope]: https://www.geeksforgeeks.org/scope-rules-in-c/ [comments]: https://en.wikipedia.org/wiki/Comment_(computer_programming) +[function]: https://en.wikipedia.org/wiki/Function_(computer_programming) From 5da0b9d25be7d35cc5f0d69be03d33a548981915 Mon Sep 17 00:00:00 2001 From: Colin Leach Date: Thu, 14 Aug 2025 15:15:24 -0700 Subject: [PATCH 2/2] Update concepts/basics/about.md Co-authored-by: Ryan Hartlage <2488333+ryanplusplus@users.noreply.github.com> --- concepts/basics/about.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/concepts/basics/about.md b/concepts/basics/about.md index ef7ee14e1..d5382a6b9 100644 --- a/concepts/basics/about.md +++ b/concepts/basics/about.md @@ -34,7 +34,7 @@ All computation is carried out as part a series of [statements][statements] that Each function can have zero or more [parameters][parameters]. When defining a function all parameters, and the return value must be explicitly typed. Values are returned from functions using the [`return` keyword][return-keyword]. -Functions have external [storage class][storage] by default, meaning that it exists for the lifetime of the program and can be visible externally to the file. +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. To prevent this the `static` keyword can be added to specify internal visibility. ```c