Thread: print the given file with line numbers

  1. #1
    Registered User
    Join Date
    Oct 2021
    Posts
    1

    print the given file with line numbers

    Hi everyone!
    Iím new to programming. I would like to ask for your help. My assigment is to modify this c file so it prints the given file with line numbers.
    Thanks in advance.

    file.cfile.hmain.c

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,362
    Sounds good. What's your plan, what have you done thus far, and what help do you need?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 06-02-2017, 04:00 PM
  2. Reading from a file and print in a different line
    By Giwrgows x in forum C Programming
    Replies: 3
    Last Post: 12-25-2015, 08:03 AM
  3. Print Hexadecimal Numbers Of a File
    By nathanpc in forum C Programming
    Replies: 4
    Last Post: 01-13-2010, 11:19 PM
  4. trying to print a line from a text file
    By kryonik in forum C++ Programming
    Replies: 1
    Last Post: 06-06-2006, 09:14 PM
  5. print line by line from a file
    By SoFarAway in forum C Programming
    Replies: 3
    Last Post: 02-18-2005, 01:36 PM

Tags for this Thread