C programming

produce “ASCII” art on standard output

you will read the image from a special file describing what characters should be placed on the screen and where. you must decode this file format to produce your output.

– prompt the user to enter a filename and read their response from stdin

– read the specified file as a special ASCII art file (described below)

-generate and display the corresponding image on standard output

– you must use at least TWO fuctions in addition to main in your code

– all errors should be recognized and reported to stderr including: failure to locate and open the input file, failure to properly read any line of the file (assume file is broken), characters that are outside the given dimensions

 

we will descibe our ASCII art images with a special input file. the first line of the file will always be the dimensions of the image as follows

WIDTHxHEIGHT

the rest of the lines in the file will be formatted as follows*

ROW, COLUMN, CHARACTER, COUNT

*all four parts of a line will be posotive whole numbers as follows:

ROW – how far down the top of the image this character is positioned

COLUMN – how far out from the left of the image this character is positioned

CHARACTER – the ‘char’ value of this character (read it as a char, %c)

COUNT – how many of these characters are repeated at this location

 

for example, the following line…

0,11,@,6

…means on the first row at the 12th spot there are 6 ‘@’ characters. it would produce a row with 11 blank spaces and then 6 @s like this

@@@@@@