Skip to content
Snippets Groups Projects
Select Git revision
  • a5608a82fdacf48773db57e7e75f08ac75862fea
  • 2024ws default
  • 2023ws
  • 2022ws
  • 2021ws
  • 2020ws
  • 2018ws
  • 2019ws
  • 2017ws
  • 2016ws
10 results

main-return-1.txt

Blame
  • main-return-1.txt 543 B
    #include <stdio.h>
    
    int main (void)
    {
      printf ("Hello, world!\n");
      return 137;
    }
    cassini/home/peter/bo/2018ws/hp/20181015> gcc -Wall -O functions-6.c -o functions-6
    cassini/home/peter/bo/2018ws/hp/20181015> ./functions-6
    Hello, world!
    cassini/home/peter/bo/2018ws/hp/20181015> echo $?
    137
    cassini/home/peter/bo/2018ws/hp/20181015> if ./functions-4; then echo "Jawohl!"; else echo "Schade."; fi
    3 + 7 = 10
    Jawohl!
    cassini/home/peter/bo/2018ws/hp/20181015> if ./functions-6; then echo "Jawohl!"; else echo "Schade."; fi
    Hello, world!
    Schade.