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
8ae9bef9
Commit
8ae9bef9
authored
4 years ago
by
Erik Strand
Browse files
Options
Downloads
Patches
Plain Diff
Update i/o README
parent
00e7a3c4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
03_inputs_and_outputs/README.md
+13
-1
13 additions, 1 deletion
03_inputs_and_outputs/README.md
with
13 additions
and
1 deletion
03_inputs_and_outputs/README.md
+
13
−
1
View file @
8ae9bef9
# Basic Input
If you want to pass arguments to your program, you can add them to
`main`
.
These examples illustrate command line arguments, and reading a file.
```
demo@linux:03_inputs_and_outputs$ make
gcc -Wall -O3 -o add_integers add_integers.c
gcc -Wall -O3 -o read_file read_file.c
demo@linux:03_inputs_and_outputs$ ./add_integers 1 2
1 + 2 = 3
demo@linux:03_inputs_and_outputs$ ./read_file
This text is in a 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