Thread: Simple but confusing.......

  1. #1
    Unregistered
    Guest

    Simple but confusing.......

    Hi all,
    New bie here. I was writing a program to hexdump the contents
    of a file to the screen when this doubt came to me. I am using
    a linux machine, My problem is this...
    When i write "abcdefg" in the file, there appears a '0x0a' at the end. And when i add 2 spaces it is '0x20 0x20' at the end ... this is
    ok...But when i add 2 spaces and an enter, the sequence changes to hex'2001201a' ... I can't find a reason for this ....
    Please throw some light...
    regards

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >Post your code
    And a segment of the file that gives you this behavior when you run the program.

    -Prelude
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple maybe, but confusing at first.
    By Queatrix in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 09-17-2006, 11:54 AM
  2. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  3. Simple simple program
    By Ryback in forum C++ Programming
    Replies: 10
    Last Post: 09-09-2004, 05:48 AM
  4. what SHOULD be a painfully simple API call...
    By Citizen Bleys in forum Windows Programming
    Replies: 3
    Last Post: 09-17-2003, 03:20 PM
  5. Simple Compile Time Problem - HELP!
    By kamikazeecows in forum Windows Programming
    Replies: 2
    Last Post: 12-02-2001, 01:30 PM