Question: Need help with a program to read a file using REDIRECTION (no file pointers!!!!). Plz help with the syntax of this program. Your program will

Need help with a program to read a file using REDIRECTION (no file pointers!!!!). Plz help with the syntax of this program.
Need help with a program to read a file using REDIRECTION (no
file pointers!!!!). Plz help with the syntax of this program. Your program

Your program will read in text from the given file poe-raven, txt using rediraction and save the text in an array. Storing multiple lines of text to an array requires a 2 -D array - the first dimension refers to the number of rows (the number of lines) and the second dimension refers to the number of columns (the number of characters) of the longest line. Using good programming practice, you can use a fdefine statement or a const int variable to hold the values of the number of lines and the length of a line. Use 200 for the number of lines (MAX_LINE) and 100 for the length of the lines (MAX LINE_LEN) as the number of lines is less than 200 and 100 is plenty big enough for the longest line. By using a Hdefine statement or a const int variable, you will not be hard-coding any loop conditions - it is typically preferred to not hard-code loop condition limits, especially when that value will be used in multiple locations in your code. The two ouputs of your program will be the text that you read in to the array, and the total number of lines in the text. As you fill up your array, you can keep track of the number of lines that are read each time a line is read in. Then you can use that value in the loop that will print the contents of the array back out. 2845byRdgazRIVanRoe Once upon a midnight dreary, while. I pondered, weak and weary. over mony a quaint and curious volure: of forgotcen lore, While I nodded, nearly napping. auddenly there cane a tapping, As of some one gently rapplng, rapping at my chamber door. "vila some yisitor," I muttered, "tapping at my chamber doorOnly this, and nothing inore. Ah, distinctly I remember it was in the bleak December, And each separate dying ember wrought ita ghost upon the floor. Eagerly 1 wiahed the mortoyt - yainly I had sought to borrow Erom my books surcease of sorrow-sorrow for the lost LenoreFor the rare and radiant maiden whom the angeig name lenoreNameless here tor evertiore. And the aiken aad uncertain rustling of each purple curtain Thrilled me- fllled ne with tantastle terrorp never fele before: So that now, to sti11 the beating of my heart, l stood repeating. n Ths some visitor entreating entrance at my chamber doorSome late yisicor entreating entrance at my chamber doortThis it is, and nothing more." Presently iny soul grew strongery heajtating then no longer, "Sit," said i, "or Madam, truly your forgiveness I implorez But the fact is I was napping, and so gently you came rapping. And so taintly you cane tapping. topping at my chamber door, That I scarce was sure I heard you" - here I ppened wide the dooriDarkness there, and nothing more. Deep into that darkness peering, long I stood there wondering. fearing. Doubting, dreaming dreams no mortals ever dared to drean beforez But the silence was unbroken, and the stillness gave no token, And the only word there apoken wos the whispered word, "Lenore!" This I whispered, and an echo nurmured back the word, "Lenore!"Merely thin, and nothing more. Backinto the chamber turning, a11 my soul within me burning. Soon again I heard a tapping somewhat louder than before. "surely." said I, "surely that is something at my window lattice: Let me see, then, what thereat, is, and this aystery explore

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!