Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
controle-c-002
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
florian.burgener
controle-c-002
Commits
42010cde
Commit
42010cde
authored
3 years ago
by
florian.burgener
Browse files
Options
Downloads
Patches
Plain Diff
Add constants
parent
35199ddc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ex1/ex1.c
+3
-1
3 additions, 1 deletion
ex1/ex1.c
ex2/ex2.c
+4
-2
4 additions, 2 deletions
ex2/ex2.c
with
7 additions
and
3 deletions
ex1/ex1.c
+
3
−
1
View file @
42010cde
...
...
@@ -13,8 +13,10 @@
#include
<stdio.h>
#include
<stdlib.h>
#define VALUES_LENGTH 8
int
main
()
{
int32_t
values_length
=
8
;
int32_t
values_length
=
VALUES_LENGTH
;
int32_t
values
[
values_length
];
// Reading of the 8 input values.
...
...
This diff is collapsed.
Click to expand it.
ex2/ex2.c
+
4
−
2
View file @
42010cde
...
...
@@ -14,6 +14,8 @@
#include
<stdio.h>
#include
<stdlib.h>
#define VALUES_LENGTH 4
// LinkedListNode.h
typedef
struct
LinkedListNode
{
...
...
@@ -255,7 +257,7 @@ void linked_list_remove_at_index(LinkedList *list, int32_t index) {
}
int
main
()
{
int32_t
values_length
=
4
;
int32_t
values_length
=
VALUES_LENGTH
;
int32_t
values
[
values_length
];
// Reading of the 4 input values to be added to the list.
...
...
@@ -278,7 +280,7 @@ int main() {
LinkedList
*
list
=
linked_list_new
();
// Addition of the 4 numbers read as input in the list.
for
(
int32_t
i
=
4
-
1
;
i
>=
0
;
i
-=
1
)
{
for
(
int32_t
i
=
values_length
-
1
;
i
>=
0
;
i
-=
1
)
{
linked_list_add_last
(
list
,
values
[
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