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
3cafb750
Commit
3cafb750
authored
5 years ago
by
orestis.malaspin
Browse files
Options
Downloads
Patches
Plain Diff
added begining of strings. table not working yet
parent
cf48dedd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+4
-1
4 additions, 1 deletion
Makefile
strings.md
+36
-0
36 additions, 0 deletions
strings.md
with
40 additions
and
1 deletion
Makefile
+
4
−
1
View file @
3cafb750
...
...
@@ -19,7 +19,7 @@ HTMLOPTIONS += -t html5
HTMLOPTIONS
+=
-c
css/tufte-css/tufte.css
HTMLOPTIONS
+=
--self-contained
all
:
tests_assertions.pdf make.pdf base_3.pdf base_2.pdf base_1.pdf intro.pdf index.html
all
:
strings.pdf
tests_assertions.pdf make.pdf base_3.pdf base_2.pdf base_1.pdf intro.pdf index.html
intro.pdf
:
intro.md metadata.yaml
pandoc
$(
PDFOPTIONS
)
-o
$@
$^
...
...
@@ -39,6 +39,9 @@ make.pdf: make.md metadata.yaml
tests_assertions.pdf
:
tests_assertions.md metadata.yaml
pandoc
$(
PDFOPTIONS
)
-o
$@
$^
strings.pdf
:
strings.md metadata.yaml
pandoc
$(
PDFOPTIONS
)
-o
$@
$^
index.html
:
index.md
pandoc
-s
$(
OPTIONS
)
$(
HTMLOPTIONS
)
-o
$@
$<
...
...
This diff is collapsed.
Click to expand it.
strings.md
0 → 100644
+
36
−
0
View file @
3cafb750
% Chaînes de caractères
% Inspirés des slides de F. Glück
% 16 octobre 2019
# Rappel: le type `char`{.C}
-
Le type
`char`
{.C} est utilisé pour représenter un caractère.
-
C'est un entier 8 bits signé.
-
En particulier:
-
Écrire
```
C
char c = 'A';
```
-
Est équivalent à:
```C
char c = 65;
```
-
Les fonctions d'affichage interprètent le nombre comme sa valeur ASCII.
# Chaînes de caractères (strings)
-
Chaîne de caractère
`==`
tableaude caractères
**terminé par la valeur `'\0'`{.C} ou `0`{.C} **
.
## Exemple
```
C
char str = "HELLO !";
```
Est représenté par
`H` | `E` | `L` | `L` | `O` | ` ` | `!` | `\0` |
===============================================
`72`
|
`69`
|
`76`
|
`76`
|
`79`
|
`32`
|
`33`
|
`0`
|
\ No newline at end of file
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