{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


ECE222(2007Fall)Prog5(MemoryScan) - Fall 2007 ECE 222...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Fall 2007 ECE 222 System Programming Concepts 1 of 3 Lab 5 – Memory Scan In this lab, each student is to write a menu-driven program called prog5.c that allows the user to search through a text file which is loaded into memory. Input The program should accept as an argument the name of an ASCII encoded file to load into memory and be searched. The file should be read into memory by storing it in a dynamically allocated array of which takes up the same amount of memory as the file. A menu should be displayed before each action which has four options: 1. Search for a given ASCII character by inputting a decimal value 0 to 255. 2. Search for a given string (up to 30 characters). 3. Display the character located at a certain address. 4. Quit All inputs should be checked for validity. Option 1 should insure search values between 0 and 255 inclusive, and Option 3 should insure a valid address. The menu should display the valid memory range for Option 3 in decimal format.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}