move exercises, lecture examples, labs into subfolders
This commit is contained in:
16
Exercises/C11/initialise_string_example_1.c
Normal file
16
Exercises/C11/initialise_string_example_1.c
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
// Main : Execution starts here...
|
||||
int main(void)
|
||||
{
|
||||
// Declare variable - pre-populate the array
|
||||
char msg[] = {'H','i',' ','W','o','r','l','d','\0'};
|
||||
|
||||
// Output with printf
|
||||
printf ("The text is: %s\n", msg);
|
||||
|
||||
puts(msg); // We could also use puts to display the string
|
||||
|
||||
return 0; // Exit the application
|
||||
}
|
||||
Reference in New Issue
Block a user