<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="de">
	<id>https://wiki.freitagsrunde.org/index.php?action=history&amp;feed=atom&amp;title=C-Kurs%2FBuchstaben_z%C3%A4hlen%2FMusterl%C3%B6sung</id>
	<title>C-Kurs/Buchstaben zählen/Musterlösung - Versionsgeschichte</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.freitagsrunde.org/index.php?action=history&amp;feed=atom&amp;title=C-Kurs%2FBuchstaben_z%C3%A4hlen%2FMusterl%C3%B6sung"/>
	<link rel="alternate" type="text/html" href="https://wiki.freitagsrunde.org/index.php?title=C-Kurs/Buchstaben_z%C3%A4hlen/Musterl%C3%B6sung&amp;action=history"/>
	<updated>2026-05-09T01:55:35Z</updated>
	<subtitle>Versionsgeschichte dieser Seite in FreitagsrundenWiki</subtitle>
	<generator>MediaWiki 1.31.16</generator>
	<entry>
		<id>https://wiki.freitagsrunde.org/index.php?title=C-Kurs/Buchstaben_z%C3%A4hlen/Musterl%C3%B6sung&amp;diff=20373&amp;oldid=prev</id>
		<title>PaulG: verschob „Ckurs/Buchstaben zählen/Musterlösung“ nach „C-Kurs/Buchstaben zählen/Musterlösung“</title>
		<link rel="alternate" type="text/html" href="https://wiki.freitagsrunde.org/index.php?title=C-Kurs/Buchstaben_z%C3%A4hlen/Musterl%C3%B6sung&amp;diff=20373&amp;oldid=prev"/>
		<updated>2013-03-05T17:37:13Z</updated>

		<summary type="html">&lt;p&gt;verschob „&lt;a href=&quot;/Ckurs/Buchstaben_z%C3%A4hlen/Musterl%C3%B6sung&quot; class=&quot;mw-redirect&quot; title=&quot;Ckurs/Buchstaben zählen/Musterlösung&quot;&gt;Ckurs/Buchstaben zählen/Musterlösung&lt;/a&gt;“ nach „&lt;a href=&quot;/C-Kurs/Buchstaben_z%C3%A4hlen/Musterl%C3%B6sung&quot; title=&quot;C-Kurs/Buchstaben zählen/Musterlösung&quot;&gt;C-Kurs/Buchstaben zählen/Musterlösung&lt;/a&gt;“&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;de&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Nächstältere Version&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Version vom 5. März 2013, 17:37 Uhr&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;de&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(kein Unterschied)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>PaulG</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.freitagsrunde.org/index.php?title=C-Kurs/Buchstaben_z%C3%A4hlen/Musterl%C3%B6sung&amp;diff=14835&amp;oldid=prev</id>
		<title>Alexander Kührmann: Die Seite wurde neu angelegt: „&lt;pre&gt; #include &lt;stdio.h&gt; #include &lt;stdlib.h&gt;  void printBar(int length) {     int i;     for (i = 0; i &lt; length; i++) {         printf(&quot;#&quot;);     } }  int main(int...“</title>
		<link rel="alternate" type="text/html" href="https://wiki.freitagsrunde.org/index.php?title=C-Kurs/Buchstaben_z%C3%A4hlen/Musterl%C3%B6sung&amp;diff=14835&amp;oldid=prev"/>
		<updated>2010-09-13T11:30:07Z</updated>

		<summary type="html">&lt;p&gt;Die Seite wurde neu angelegt: „&amp;lt;pre&amp;gt; #include &amp;lt;stdio.h&amp;gt; #include &amp;lt;stdlib.h&amp;gt;  void printBar(int length) {     int i;     for (i = 0; i &amp;lt; length; i++) {         printf(&amp;quot;#&amp;quot;);     } }  int main(int...“&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Neue Seite&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
#include &amp;lt;stdlib.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
void printBar(int length) {&lt;br /&gt;
    int i;&lt;br /&gt;
    for (i = 0; i &amp;lt; length; i++) {&lt;br /&gt;
        printf(&amp;quot;#&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main(int argc, char **argv) {&lt;br /&gt;
    if (argc != 2) {&lt;br /&gt;
        printf(&amp;quot;missing filename\n&amp;quot;);&lt;br /&gt;
        return 0;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // open file&lt;br /&gt;
    FILE *file = fopen(argv[1], &amp;quot;r&amp;quot;);&lt;br /&gt;
    if (file == NULL) {&lt;br /&gt;
        printf(&amp;quot;cannot open file\n&amp;quot;);&lt;br /&gt;
        return 0;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // initialize counting array&lt;br /&gt;
    int counts[26] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};&lt;br /&gt;
    int allCount = 0;&lt;br /&gt;
&lt;br /&gt;
    // read every character in the file and count if it's a letter&lt;br /&gt;
    while (1) {&lt;br /&gt;
        int character = fgetc(file);&lt;br /&gt;
        if (character &amp;lt; 0) {&lt;br /&gt;
            // we reached end of file&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        if (character &amp;gt;= 'A' &amp;amp;&amp;amp; character &amp;lt;= 'Z') {&lt;br /&gt;
            // we found a capital letter&lt;br /&gt;
            counts[character - 'A']++;&lt;br /&gt;
            allCount++;&lt;br /&gt;
        } else if (character &amp;gt;= 'a' &amp;amp;&amp;amp; character &amp;lt;= 'z') {&lt;br /&gt;
            // we found a letter&lt;br /&gt;
            counts[character - 'a']++;&lt;br /&gt;
            allCount++;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // close the file&lt;br /&gt;
    fclose(file);&lt;br /&gt;
&lt;br /&gt;
    // print the results&lt;br /&gt;
    int i;&lt;br /&gt;
    for (i = 0; i &amp;lt; 26; i++) {&lt;br /&gt;
        printf(&amp;quot;%c : %3d  &amp;quot;, (char)(i + 'A'), counts[i]);&lt;br /&gt;
        printBar((counts[i] * 300) / allCount);&lt;br /&gt;
        printf(&amp;quot;\n&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Alexander Kührmann</name></author>
		
	</entry>
</feed>