Skip to content

Commit c80da83

Browse files
authored
docs: few minor fixes. (#4647)
* docs: corrected a small grammar mistake Corrected a small grammar mistake found in the documentation related to the extern specifier. melody * docs: added missing comma in example code Added a missing comma in the documentation related to C Type Specifiers. * docs: added missing comma in example code Added a missing comma in the documentation related to declarators and variable declarations. * docs: remove unnecessary forward slash in code example Removed an unnecessary forward slash in the code example provided in the documentation related to C enumeration declarations.
1 parent 2fc3e6a commit c80da83

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

docs/c-language/c-enumeration-declarations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ enum BOOLEAN end_flag, match_flag; /* Two variables of type BOOLEAN */
103103
This declaration can also be specified as
104104

105105
```C
106-
enum BOOLEAN { false, true } end_flag, match_flag;\
106+
enum BOOLEAN { false, true } end_flag, match_flag;
107107
```
108108
109109
or as

docs/c-language/c-type-specifiers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The Microsoft C compiler also generates warnings for differences in sign. For ex
5555

5656
```C
5757
signed int *pi;
58-
unsigned int *pu
58+
unsigned int *pu;
5959

6060
pi = pu; /* Now generates warning */
6161
```

docs/c-language/declarators-and-variable-declarations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ int list[20]; // Declares an array of 20 int values named list
6767
char *cp; // Declares a pointer to a char value
6868
double func( void ); // Declares a function named func, with no
6969
// arguments, that returns a double value
70-
int *aptr[10] // Declares an array of 10 pointers
70+
int *aptr[10]; // Declares an array of 10 pointers
7171
```
7272

7373
**Microsoft Specific**

docs/c-language/extern-storage-class-specifier.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void func(void)
4949
}
5050
```
5151
52-
In this example, the variable `i` is defined in Source1.c with an initial value of 1. An **`extern`** declaration in Source2.c is makes 'i' visible in that file.
52+
In this example, the variable `i` is defined in Source1.c with an initial value of 1. An **`extern`** declaration in Source2.c makes 'i' visible in that file.
5353
5454
In the `func` function, the address of the global variable `i` is used to initialize the **`static`** pointer variable `external_i`. This works because the global variable has **`static`** lifetime, meaning its address does not change during program execution. Next, a variable `i` is defined within the scope of `func` as a local variable with initial value 16. This definition does not affect the value of the external-level `i`, which is hidden by the use of its name for the local variable. The value of the global `i` is now accessible only through the pointer `external_i`.
5555

0 commit comments

Comments
 (0)