User Tools

Site Tools


c:stdio.h:getchar

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

c:stdio.h:getchar [2013/01/22 22:02]
127.0.0.1 external edit
c:stdio.h:getchar [2024/02/16 01:05] (current)
Line 21: Line 21:
  
 int main ( void ) { int main ( void ) {
-int chars; +   int chars; 
-printf("type in . to end your input : ");+   printf("type in . to end your input : ");
  
-while ((chars = getchar()) != '.' ){ +   while ((chars = getchar()) != '.' ){ 
-   putchar(chars);+      putchar(chars);
    }    }
-return 0;+   return 0;
 } }
 </code> </code>
Line 35: Line 35:
     user@host:~$ ./getchar      user@host:~$ ./getchar 
     type in . to end your input : Test 1234.     type in . to end your input : Test 1234.
-    Test 123+    Test 1234
  

on the occasion of the current invasion of Russia in Ukraine

Russian Stop this War
c/stdio.h/getchar.1358888555.txt · Last modified: 2024/02/16 01:03 (external edit)

Impressum Datenschutz