yeah, in my actual code i do check to make sure fopen worked thanks for the pointer though. Its been a while since i used C and im just testing ideas at the moment to get back into it, but as a second questions. If i input the following code
should the file test.bin contain the binary version of ABCDEFGHIJ or should it show ABCDEFGHIJ if opened in notepad?
printf("Couldnot open file");
fwrite(x, sizeof(x), sizeof(x)/sizeof(x), fp);