Skip to content
Snippets Groups Projects
Commit de8c8b45 authored by Peter Gerwinski's avatar Peter Gerwinski
Browse files

Beispiele und Screenshot 10.10.2022

parent d234f23b
Branches
No related tags found
No related merge requests found
#include <stdio.h>
void hello ()
{
printf ("Hello, world!\n");
}
int main ()
{
hello ();
return 0;
}
#include <stdio.h>
void hello ()
{
printf ("Hello, world!\n");
}
int main ()
{
hello ("Hallo, Welt!\n");
return 0;
}
#include <stdio.h>
void hello (void)
{
printf ("Hello, world!\n");
}
int main (void)
{
hello ("Hallo, Welt!\n");
return 0;
}
#include <stdio.h>
void philosophy (a)
int a;
{
printf ("The answer is: %d.\n", a);
}
int main (void)
{
philosophy (137);
return 0;
}
#include <stdio.h>
void philosophy (a)
int a;
{
printf ("The answer is: %d.\n", a);
}
int main (void)
{
philosophy ("Hello, world!\n");
return 0;
}
#include <stdio.h>
void philosophy (a)
int a;
{
printf ("The answer is: %d.\n", a);
}
int main (void)
{
philosophy ("Hello, world!\n");
return 0;
}
cassini/home/peter/bo/2022ws/hp/20221010> gcc -Wall -O functions-05.c -o functions-05
cassini/home/peter/bo/2022ws/hp/20221010> ./functions-05
The answer is: -1434640360.
cassini/home/peter/bo/2022ws/hp/20221010> ./functions-05
The answer is: -402571240.
cassini/home/peter/bo/2022ws/hp/20221010> ./functions-05
The answer is: 588369944.
cassini/home/peter/bo/2022ws/hp/20221010> ./functions-05
The answer is: 97824792.
cassini/home/peter/bo/2022ws/hp/20221010>
#include <stdio.h>
int main (void)
{
int a = 42;
if (a = 0)
printf ("a ist gleich 0.\n");
else
printf ("a ist ungleich 0, nämlich %d.\n", a);
return 0;
}
#include <stdio.h>
int main (void)
{
int a = 42;
if ((a = 0) != 0)
printf ("a ist gleich 0.\n");
else
printf ("a ist ungleich 0, nämlich %d.\n", a);
return 0;
}
#include <stdio.h>
int main (void)
{
int a = 42;
if (a == 0)
printf ("a ist gleich 0.\n");
else
printf ("a ist ungleich 0, nämlich %d.\n", a);
return 0;
}
#include <stdio.h>
int main (void)
{
int a = 42;
if (a += 0)
printf ("a ist gleich 0.\n");
else
printf ("a ist ungleich 0, nämlich %d.\n", a);
return 0;
}
#include <stdio.h>
int main (void)
{
int a = 42;
if (a += 0)
printf ("a += 0 ist ungleich 0, nämlich %d.\n", a);
else
printf ("a += 0 ist gleich 0.\n");
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment