Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 2014ss
  • 2015ss
  • 2016ss
  • 2017ss
  • 2018ss
  • 2019ss
  • 2020ss
  • 2021ss
  • 2022ss
  • 2023ss
  • 2024ss
  • 2025ss
12 results

Target

Select target project
  • pgerwinski/bs
  • cloepke/bs
  • khaleeliyeh/bs
3 results
Select Git revision
  • 2014ss
  • 2015ss
  • 2016ss
  • 2017ss
  • 2018ss
  • 2019ss
  • 2020ss
  • 2021ss
  • 2022ss
  • 2023ss
10 results
Show changes
Showing
with 291 additions and 243 deletions
#include <stdio.h>
int main (void)
{
char *str1 = "Hello, world!";
char *str2 = "Hier ist viel Platz.";
scanf ("%s", str2);
printf ("%s\n%s\n", str1, str2);
return 0;
}
#include <stdio.h>
int main (void)
{
char str1[] = "Hello, world!";
char str2[] = "Hier ist viel Platz.";
scanf ("%s", str2);
printf ("%s\n%s\n", str1, str2);
return 0;
}
#include <stdio.h>
#include <sys/mman.h>
int main (void)
{
char *str1 = "Hello, world!";
char *str2 ="Hier ist viel Platz.";
mprotect (str1, 65536, PROT_WRITE | PROT_READ);
scanf ("%s", str2);
printf ("%s\n%s\n", str1, str2);
return 0;
}
#include <stdio.h>
int main (void)
{
/* printf ("Hauptprogramm, vor printf\n"); */
printf ("Hello, world!\n");
/* printf ("Hauptprogramm, nach printf\n");
*/
return 0;
}
#include <stdio.h>
int main (void) { printf ("Hello, world!\n"); return 0; }
#include <stdio.h>
int main (void)
{
int a = 3;
int b = 2;
if (b != 0)
printf ("a / b = %d\n", a / b);
else
printf ("Kann nicht durch 0 dividieren.\n");
printf ("Ciao!\n");
return 0;
}
#include <stdio.h>
int main (void)
{
int a = 6;
int b = 2;
if (b = 0)
{
printf ("Kann nicht durch 0 dividieren.\n");
printf ("Ciao!\n");
}
else
printf ("a / b = %d\n", a / b);
return 0;
}
#include <stdio.h>
int main (void)
{
int a = 6;
int b = 2;
if ((b = 0))
{
printf ("Kann nicht durch 0 dividieren.\n");
printf ("Ciao!\n");
}
else
printf ("a / b = %d\n", a / b);
return 0;
}
#include <stdio.h>
#include <stdlib.h>
int main (void)
{
int *a = malloc (5 * sizeof (int));
for (int i = 1; i <= 5; i++)
a[i] = i;
for (int i = 1; i <= 5; i++)
printf ("%d\n", a[i]);
return 0;
}
#include <stdio.h>
int main (void)
{
char *str1 = "Hello, world!";
char *str2 = "";
scanf ("%s", &str2);
printf ("%s\n%s\n", str1, str2);
return 0;
}
#include <stdio.h>
int main (void)
{
char *str1 = "Hello, world!";
char *str2 = "";
printf ("str2 = %x --> %x\n", str2, *str2);
scanf ("%s", &str2);
printf ("str2 = %x --> %x\n", str2, *str2);
printf ("%s\n%s\n", str1, str2);
return 0;
}
cassini/home/peter/bo/2025ss/bs/20250324> echo "Hello, world!"
Hello, world!
cassini/home/peter/bo/2025ss/bs/20250324> printf "Hello, world!"
Hello, world!cassini/home/peter/bo/2025ss/bs/20250324> printf "Hello, world!\n"
bash: !\n: event not found
cassini/home/peter/bo/2025ss/bs/20250324> printf 'Hello, world!\n'
Hello, world!
cassini/home/peter/bo/2025ss/bs/20250324>
cassini/home/peter/bo/2025ss/bs/20250324> printf 'Hello, world!\n'
Hello, world!
cassini/home/peter/bo/2025ss/bs/20250324> printf 'The answer is %d.\n' 42
The answer is 42.
cassini/home/peter/bo/2025ss/bs/20250324> printf 'The answer is %04d.\n' 137
The answer is 0137.
cassini/home/peter/bo/2025ss/bs/20250324>
cassini/home/peter/bo/2025ss/bs/20250324> hello="Hello, world!"
cassini/home/peter/bo/2025ss/bs/20250324> echo $hello
Hello, world!
cassini/home/peter/bo/2025ss/bs/20250324> echo "$hello"
Hello, world!
cassini/home/peter/bo/2025ss/bs/20250324> echo '$hello'
$hello
cassini/home/peter/bo/2025ss/bs/20250324>
cassini/home/peter/bo/2025ss/bs/20250324> !!
cat >> ausgabe-01.txt
^C
cassini/home/peter/bo/2025ss/bs/20250324> echo "Hello, world!"
Hello, world!
cassini/home/peter/bo/2025ss/bs/20250324> !!
echo "Hello, world!"
Hello, world!
cassini/home/peter/bo/2025ss/bs/20250324> !\
bash: !\: event not found
cassini/home/peter/bo/2025ss/bs/20250324> \!
bash: !: Kommando nicht gefunden.
cassini/home/peter/bo/2025ss/bs/20250324>
aus "man bash":
When the command history expansion facilities are being used (see HISTORY EXPANSION
below), the history expansion character, usually !, must be quoted to prevent his‐
tory expansion.
cassini/home/peter/bo/2025ss/bs/20250324> !2
bash: !2: event not found
cassini/home/peter/bo/2025ss/bs/20250324> !ls
ls -lrt
insgesamt 420
lrwxrwxrwx 1 peter peter 43 17. Apr 2016 Operating_system_placement-de.pdf -> ../common/Operating_system_placement-de.pdf
lrwxrwxrwx 1 peter peter 22 13. Apr 2018 pgslides.sty -> ../common/pgslides.sty
lrwxrwxrwx 1 peter peter 30 14. Mär 2023 fotos -> /home/peter/Photos/vorstellung
lrwxrwxrwx 1 peter peter 48 24. Mär 08:11 logo-hochschule-bochum-cvh-text-v3.pdf -> ../common/logo-hochschule-bochum-cvh-text-v3.pdf
lrwxrwxrwx 1 peter peter 46 24. Mär 08:12 logo-hochschule-bochum-de-narrow.pdf -> ../common/logo-hochschule-bochum-de-narrow.pdf
-rw-r--r-- 1 peter peter 42617 24. Mär 08:34 bs-20250324.tex
-rw-r--r-- 1 peter peter 111583 24. Mär 08:34 bs-20250324.pdf
-rw-r--r-- 1 peter peter 19360 24. Mär 14:14 unix-20250324.tex
-rw-r--r-- 1 peter peter 272 24. Mär 14:14 unix-20250324.vrb
-rw-r--r-- 1 peter peter 0 24. Mär 14:14 unix-20250324.snm
-rw-r--r-- 1 peter peter 6806 24. Mär 14:14 unix-20250324.aux
-rw-r--r-- 1 peter peter 589 24. Mär 14:14 unix-20250324.toc
-rw-r--r-- 1 peter peter 1200 24. Mär 14:14 unix-20250324.out
-rw-r--r-- 1 peter peter 4242 24. Mär 14:14 unix-20250324.nav
-rw-r--r-- 1 peter peter 58120 24. Mär 14:14 unix-20250324.log
-rw-r--r-- 1 peter peter 128817 24. Mär 14:15 unix-20250324.pdf
-rw-r--r-- 1 peter peter 5853 24. Mär 14:22 unix-baukasten-01.txt
-rw-r--r-- 1 peter peter 8626 24. Mär 14:24 unix-optionen-01.txt
-rw-r--r-- 1 peter peter 372 24. Mär 14:25 ausgabe-01.txt
-rw-r--r-- 1 peter peter 419 24. Mär 14:28 ausrufezeichen-01.txt
File added
#!/bin/bash
echo -n "Name: "
read name
echo Hallo $name