Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
c_cpp_and_make
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
Model registry
Operate
Environments
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
pub
hello-world
c_cpp_and_make
Commits
c98c0bdf
Commit
c98c0bdf
authored
4 years ago
by
Erik Strand
Browse files
Options
Downloads
Patches
Plain Diff
Update READMEs
parent
548c36cc
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
01_hello_world/README.md
+2
-0
2 additions, 0 deletions
01_hello_world/README.md
02_control_structures/README.md
+32
-0
32 additions, 0 deletions
02_control_structures/README.md
with
34 additions
and
0 deletions
01_hello_world/README.md
+
2
−
0
View file @
c98c0bdf
...
@@ -8,8 +8,10 @@ your toolchain is installed correctly, this will build two programs: `hello_worl
...
@@ -8,8 +8,10 @@ your toolchain is installed correctly, this will build two programs: `hello_worl
demo@linux:01_hello_world$ make
demo@linux:01_hello_world$ make
gcc -Wall -O3 -o hello_world_c hello_world.c
gcc -Wall -O3 -o hello_world_c hello_world.c
g++ -Wall -O3 -o hello_world_cpp hello_world.cpp
g++ -Wall -O3 -o hello_world_cpp hello_world.cpp
demo@linux:01_hello_world$ ./hello_world_c
demo@linux:01_hello_world$ ./hello_world_c
hello, world, I'm C
hello, world, I'm C
demo@linux:01_hello_world$ ./hello_world_cpp
demo@linux:01_hello_world$ ./hello_world_cpp
hello, world, I'm C++
hello, world, I'm C++
```
```
...
...
This diff is collapsed.
Click to expand it.
02_control_structures/README.md
+
32
−
0
View file @
c98c0bdf
# Control Structures
# Control Structures
These examples demonstrate loops and functions.
These examples demonstrate loops and functions.
```
demo@linux:02_control_structures$ make
gcc -Wall -O3 -o loops loops.c
gcc -Wall -O3 -o functions functions.c
demo@linux:02_control_structures$ ./loops
while loop: 0
while loop: 1
while loop: 2
while loop: 3
while loop: 4
for loop: 0
for loop: 1
for loop: 2
for loop: 3
for loop: 4
another while loop: 0
another while loop: 1
another while loop: 2
leaving the while loop
1 is odd
3 is odd
i is 42
demo@linux:02_control_structures$ ./functions
two is even
three is odd
four isn't prime
5! = 120
6 choose 4 = 15
```
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