-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhelloworldc.html
72 lines (65 loc) · 2.4 KB
/
helloworldc.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<html>
<head>
<link href="https://fonts.googleapis.com/css2?family=Amatic+SC:wght@400;700&family=Open+Sans+Condensed:ital,wght@0,300;1,300&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/css/style.css">
<title>whims</title>
</head>
<header>
<div id="navbar">
<h1><a href="index.html">Just a Whimsical Spud</a></h1>
<div id="nav-items">
<div class="langnav"><a href="java.html">Java</a></div>
<div class="langnav"><a href="c.html">C</a></div>
</div>
</div>
</header>
<body>
<h4>Hello, World! </h4>
<div class="codebox">
<pre>
<code>
<span id="cln1">#include <stdio.h></span>
<span class="cln2-4">int main() {</span>
<span id="cln3">printf("Hello, World!");</span>
<span class="cln2-4">return 0;</span>
<span class="cln2-4">}</span>
</code>
</pre>
</div>
<div class="bottom-half">
<div class="descrip" id="cln1-exp">
<pre class="code-blk-exp"><code>
#include <stdio.h>
</code></pre>
<ul class="exp">
<li><b>#include</b>: enthalten</li>
<li><b>stdio</b>.h: <b>st</b>an<b>d</b>ard <b>i</b>nput/<b>o</b>utput, m.a.W. Eingang/Outgang</li>
<li>stdio<b>.h</b>: das 'h' bedeutet "<b>h</b>eader file", wörtlich 'Kopfzeile Datei' - Datei, die man braucht, das Programm richtig durchzuführen </li>
</ul>
</div>
<div class="descrip" id="cln2-4-exp">
<pre class="code-blk-exp"><code>
int main() {
...
return 0;
}
</code></pre>
<ul class="exp">
<li><b>int</b>: Abkürzung für "<b>int</b>eger", oder 'ganze Zahl'</li>
<li><b>main</b>: "haupt". "main" ist normalerweise das Hauptprogramm</li>
<li><b>return 0</b>: <b>0</b> vom Programm <b>zurückgeben</b>. 0 bezeichnet "erfolgreiche Durchführung" </li>
</ul>
</div>
<div class="descrip" id="cln3-exp">
<pre class="code-blk-exp"><code>
printf("Hallo, Welt!")
</code></pre>
<ul class="exp">
<li><b>print</b>f: drucken; wir wollen das Text (oder "Ausgang") abbilden</li>
<li>print<b>f</b>: das 'f' steht für <b>F</b>ormat; wir können das Text mit Nummern oder andere Sache formatieren, vor wir es abbilden</li>
</ul>
</div>
</div>
<script src="assets/js/cscript.js"></script>
</body>
</html>