Add block comment example and remove whitespace (#28816)

* Add block comment example and remove whitespace

* fix: capitalized string to match output

* fix: removed >
This commit is contained in:
Dylan Rainwater
2019-02-11 11:18:16 -05:00
committed by Aditya
parent 0de4ebb010
commit 13115bfb4e

View File

@ -9,14 +9,14 @@ To write on console you can use the function `printf()` contained in the library
```C ```C
#include <stdio.h> #include <stdio.h>
/* Any text in between these two characters is a block comment.
Block comments, unlike inline comments, can span multiple lines.
Comments are ignored by the compiler and will not be executed.
*/
int main(void) int main(void)
{ {
printf("hello, world\n"); // lines starting with this (//) are called comments.. printf("Hello, World!\n"); // lines starting with double forward-slash are called inline comments..
//this code prints "Hello World!"
printf("Hello World!\n"); //<-- the \n character prints a newline after the string
return 0; return 0;
} }
``` ```
@ -31,7 +31,7 @@ To write on console you can use the function `printf()` contained in the library
## Output: ## Output:
``` ```
>Hello, World! Hello, World!
``` ```
#### More Information #### More Information