Write Access Violation when communicating with C

Thanks for the reply!

I just used Serial.println()'s as cross checks to see if any data is arriving or not to arduino.So i just printed it out on the serial monitor.Is that causing the problem?

I dont intend to send anything back to C!.