Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C program called pre. that takes command line arguments that are file names, reads the text from each file, and creates a web

Write a C program called pre. that takes command line arguments that are file names, reads the text from each file, and creates a web page (using html) that displays the file.

HTML is a markup language, meaning that it specifies formatting for text using tags of the form ... with the text to be formatted in between the opening and closing tag. For example, a level one header is written as

This is a Title

.

Your program will read from each input file and write to output files. The output file names will end in .html. If the input file name has an extension, it will be replaced by .html. If it does not, the .html will simply be appended to the name.

HTML files should have some boilerplate at the top. The files you create will have this:

     TITLE   

where TITLE is replaced by the name of the input file. Also < characters and ampersands have special meanings to HTML. < begins tags and ampersands are used to specify special characters. As you write out the contents of the input file, you will replace < with "<" and & with "&". Also, before the text from the input file is written out, you will write out the file name as a level one header. So if the input file hello.c is processed, and it contains

#include  int main() { printf("Hello, world "); } 

Then the output should be

     hello.c   

hello.c

 #include  int main() { printf("Hello, world "); } 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Information And Database Systems Asian Conference Aciids 2012 Kaohsiung Taiwan March 19 21 2012 Proceedings Part 3 Lnai 7198

Authors: Jeng-Shyang Pan ,Shyi-Ming Chen ,Ngoc-Thanh Nguyen

2012th Edition

3642284922, 978-3642284922

More Books

Students also viewed these Databases questions

Question

6. Explain the power of labels.

Answered: 1 week ago

Question

5. Give examples of variations in contextual rules.

Answered: 1 week ago

Question

f. What stereotypes were reinforced in the commercials?

Answered: 1 week ago