#include <unistd.h>
#include <stdio.h>
int main(void) {
char str[] = "1234";
int count = sizeof(str) - 1; // -1 to exclude the null terminator
printf("%d", count); //output: 4
write(1, str, count); //output: 1234 (printed earlier)
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: