Question: I've got an array of characters which could contain a NULL character.  

The array is not null-terminated, but I do know it's length. 

**Question**  

How do I output this exact array (including null characters) and nothing else (no trailing \n) to stdout? Unfortunately, I am not allowed to output one character at a time.

Answer: 
```
char buffer[SIZE];

if(fwrite(buffer, 1, SIZE, stdout) != SIZE) {
    perror("fwrite");
}

```
Though hard to find if you're a C newbie, the answer turns out to be very easy. 

C sees stdout as a file, which means you can simply use fwrite to accomplish this. 

```
fwrite(CHAR_ARRAY, sizeof(char), NR_CHARS, stdout);

```