Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cours_prog
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
yassin.elhakoun
cours_prog
Commits
0994306d
Commit
0994306d
authored
5 years ago
by
orestis.malaspin
Browse files
Options
Downloads
Patches
Plain Diff
correction ortho
parent
eb88cccc
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
base_2.md
+4
-4
4 additions, 4 deletions
base_2.md
with
4 additions
and
4 deletions
base_2.md
+
4
−
4
View file @
0994306d
...
...
@@ -39,7 +39,7 @@
```C
type *id;
```
-
Pour interpr
ê
ter le contenu de ce qu'il pointe, il doit être typé.
-
Pour interpr
é
ter le contenu de ce qu'il pointe, il doit être typé.
-
Un pointeur n'est rien d'autre qu'un entier (64bit sur x86-64, soit 8 octets).
-
Un pointeur peut être
**déréférencé**
: on accède à la valeur située à l'adresse mémoire sur laquelle il pointe.
...
...
@@ -196,7 +196,7 @@ int main() {
-
Pour modifier un variable, il faut passer son
**adresse mémoire**
.
-
L'adresse d'une variable,
`x`
{.C}, est accédé par
`&x`
{.C}.
-
Un
**pointeur**
vers une variable entière a le type,
`int *x`
{.C}.
-
La sytaxe
`*x`
{.C} sert à
**déréférencer**
le pointeur (à accéder à la mémoire pointée).
-
La sy
n
taxe
`*x`
{.C} sert à
**déréférencer**
le pointeur (à accéder à la mémoire pointée).
# Les fonctions (7/N)
...
...
@@ -366,7 +366,7 @@ int main(void) {
```
C
int x[10];
for (int i = 0;
0
< 10; ++i) {
for (int i = 0;
i
< 10; ++i) {
x[i] = 0;
}
int j = 0;
...
...
@@ -397,7 +397,7 @@ do {
printf("tab[%d] = %d\n", i, tab[i]);
}
}
// n doit venir avant tab, [n] opionel
// n doit venir avant tab, [n] op
t
ion
n
el
void bar(int n, int tab[n]) {
for (int i = 0; i < n; ++i) {
printf("tab[%d] = %d\n", i, tab[i]);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment