Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

how to extract contents of first line from a file?

i need complete help regarding how to open a file then reading and extracting first line of that file?i am new to programming i have theory knowledge of this but don't know how to code my work
plz any 1 help thnx

Comments

  • Joe2003Joe2003 Member Posts: 92
    : i need complete help regarding how to open a file then reading and
    : extracting first line of that file?i am new to programming i have
    : theory knowledge of this but don't know how to code my work
    : plz any 1 help thnx

    Do you want the output in an array?

    You can uses getchar, so

    [code]while((c = getchar) != '
    ')[/code]
Sign In or Register to comment.