how to write data into a device file?

Hi,
I am working in device drivers. I am new to device drivers. i have invoked chardev.c.
the driver is insmoded. now i want to write something into this and i want to look what i have written. but i don't know how to write and see. please help me