Strange occurence when working with file input output:

Here is my code.
Code:
#include <stdio.h>
int main()
{
FILE *fp;
fp=fopen("c:\\test.txt", "wb");
char x[10]="ABCDEFGHIJ";
fwrite(x, sizeof(x[0]), sizeof(x)/sizeof(x[0]), fp);
system("Pause");
}

Here is what she looks like when compiling.

Code:
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.
poop.c
poop.c(7) : error C2143: syntax error : missing ';' before 'type'
poop.c(8) : error C2065: 'x' : undeclared identifier
poop.c(8) : warning C4022: 'fwrite' : pointer mismatch for actual parameter 1
poop.c(8) : error C2065: 'x' : undeclared identifier
poop.c(8) : error C2109: subscript requires array or pointer type
poop.c(8) : error C2065: 'x' : undeclared identifier
poop.c(8) : error C2065: 'x' : undeclared identifier
poop.c(8) : error C2109: subscript requires array or pointer type
poop.c(8) : warning C4047: 'function' : 'size_t' differs in levels of indirectio
n from 'FILE *'
poop.c(8) : warning C4024: 'fwrite' : different types for formal and actual para
meter 2
poop.c(8) : error C2198: 'fwrite' : too few arguments for call

This was compiling and working previously. I am unsure of what happened and why. Thank you for your input on my output

Note: test.txt is located at C:\test.txt