Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Gerwinski
hp
Commits
52cb7eca
Commit
52cb7eca
authored
5 years ago
by
Peter Gerwinski
Browse files
Options
Downloads
Patches
Plain Diff
Korrektur Musterlösung 14.11.2019
parent
cbdaa0ad
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
20191114/hp-musterloesung-20191114.pdf
+0
-0
0 additions, 0 deletions
20191114/hp-musterloesung-20191114.pdf
20191114/hp-musterloesung-20191114.tex
+3
-3
3 additions, 3 deletions
20191114/hp-musterloesung-20191114.tex
20191114/loesung-2.c
+2
-2
2 additions, 2 deletions
20191114/loesung-2.c
with
5 additions
and
5 deletions
20191114/hp-musterloesung-20191114.pdf
+
0
−
0
View file @
52cb7eca
No preview for this file type
This diff is collapsed.
Click to expand it.
20191114/hp-musterloesung-20191114.tex
+
3
−
3
View file @
52cb7eca
...
...
@@ -252,8 +252,8 @@
also die Schleife umdrehen
\\
(siehe:
\gitfile
{
hp
}{
20191114
}{
loesung-2.c
}
):
\begin{lstlisting}
{
gobble=8
}
for (int i = len; i > pos; i
++
)
target[i] = target[i
- 1
];
for (int i = len; i >
=
pos; i
--
)
target[i
+ 1
] = target[i];
\end{lstlisting}
\item
...
...
@@ -270,7 +270,7 @@
Wenn wir nun in den String ein zusätzliches Zeichen einfügen,
ist dafür kein Speicherplatz reserviert worden,
und wir
\textbf
{
überschreiben
}
dann Speicher, an dem sich andere Variable
n
befinden,
und wir
\textbf
{
überschreiben
}
dann Speicher, an dem sich andere Variable befinden,
was zu einem
\textbf
{
Absturz
}
führen kann.
Da wir hier nur ein einziges Zeichen schreiben,
...
...
This diff is collapsed.
Click to expand it.
20191114/loesung-2.c
+
2
−
2
View file @
52cb7eca
...
...
@@ -4,8 +4,8 @@
void
insert_into_string
(
char
src
,
char
*
target
,
int
pos
)
{
int
len
=
strlen
(
target
);
for
(
int
i
=
len
;
i
>
pos
;
i
++
)
target
[
i
]
=
target
[
i
-
1
];
for
(
int
i
=
len
;
i
>
=
pos
;
i
--
)
target
[
i
+
1
]
=
target
[
i
];
target
[
pos
]
=
src
;
}
...
...
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