-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwelcome4.c
20 lines (15 loc) · 991 Bytes
/
welcome4.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>
//Available functions: https://github.com/KilianKegel/toro-C-Library#implementation-status
int main(int argc, char **argv) {
#define STRING "Welcome, to the jungle\n"
size_t lenght = sizeof(STRING);
char string[] = {STRING};
printf("simple Hello, world using fwrite() to stdout and stderr:\n");
fwrite(string, lenght, 1, stdout); //fwrite(to stdout) - file write to STDOUT is identical to write to a real file -- that equality was introduced in UNIX/C
fwrite(string, lenght, 1, stderr); //fwrite(to stderr) - file write to STDERR is identical to write to a real file -- that equality was introduced in UNIX/C
// HOMEWORK:
// 1. Please take note of the additional invisible character preceeding the second line of output
// 2. verify, by rebuilding that welcome4.c with the original microsoft library LIBCMT.LIB, that it is excpected behaviour
// 3. explain behaviour and fix it!
return 0;
}