Skip to content

docs: few minor fixes. #4647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/c-language/c-enumeration-declarations.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ enum BOOLEAN end_flag, match_flag; /* Two variables of type BOOLEAN */
This declaration can also be specified as

```C
enum BOOLEAN { false, true } end_flag, match_flag;\
enum BOOLEAN { false, true } end_flag, match_flag;
```

or as
Expand Down
2 changes: 1 addition & 1 deletion docs/c-language/c-type-specifiers.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The Microsoft C compiler also generates warnings for differences in sign. For ex

```C
signed int *pi;
unsigned int *pu
unsigned int *pu;

pi = pu; /* Now generates warning */
```
Expand Down
2 changes: 1 addition & 1 deletion docs/c-language/declarators-and-variable-declarations.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ int list[20]; // Declares an array of 20 int values named list
char *cp; // Declares a pointer to a char value
double func( void ); // Declares a function named func, with no
// arguments, that returns a double value
int *aptr[10] // Declares an array of 10 pointers
int *aptr[10]; // Declares an array of 10 pointers
```

**Microsoft Specific**
Expand Down
2 changes: 1 addition & 1 deletion docs/c-language/extern-storage-class-specifier.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void func(void)
}
```

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.
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.

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`.

Expand Down