EmbLogic's Blog

Project 01

I am facing a Problem

when i am creating a file manually like using command vim filename….size of the file is one greater than the no of bytes(charcters) in the file…while checking what exactly that last byte is, i found that is EOLine (10 in decimal)..

But if i creat a file using c library function open and write, the size is exactly equal to the no of bytes in file….Why is it so?????

2 Responses to Project 01

  1. Anil Jangra says:

    When a file is created using vim an ENTER is inserted at the end of the file which has ASCII value 26.
    But this does not happen when a file is created using C program.

  2. Ganesh Kale says:

    ya the 10 is the carriage feedback……….
    when u press enter.

Leave a Reply to Anil Jangra Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>