Read an ascii file and perform operations chosen by user on it

Closed

Objective: Write a program capable of performing some elementary text analysis according to the following specifications. DESCRIPTION This program reads an ASCII text from file textin, performs one analysis operation as specified by one of the options s, f, r, c then writes the result onto file textout.

## Deliverables

This program reads an ASCII text from file textin, performs one analysis operation as specified by one of the options s, f, r, c then writes the result onto file textout. OPTIONS -s Sort the input text words lexicographically in ascending order. This program defines a “word?? as any sequence of characters preceded or followed by at least one space, tab or newline characters. The output consists of the number of different input words on one line, followed by a sorted list of all different input words, with one word per line. -f Compute the number of occurrences of all input text words. The output consists of the input words and number of occurrences on one line. -r This option may be specified in conjunction with the -s option (it is silently ignored in all other cases), and its effect is to reverse the sorting order in the output. -c This option may be specified in conjunction with the -f option (it is silently ignored in all other cases), and its effect is to make the program compute the frequency of occurrence of characters instead of words. All ASCII characters must appear in the list, with a frequency of 0 for those absent in the input text. DIAGNOSTICS Upon successful completion the program exits with 0-exit status. Otherwise an appropriate diagnostic message is output on standard error, and an exit status of 1 is reported. In particular, an “Usage'' message, explaining the command synopsis and giving a brief explanation of each option, must be reported on standard error whenever an illegal option is specified on the command line. - You may use input and output redirection to read and write the text files. Alternatively, you may use file handling functions of C. 1. Also In this assignment, you have to use command line arguments to specify the appropriate switch (option) while running your program. 2. Basically, this program should perform 4 tasks as defined with each switch. You may use the switch as command line as you think appropriate.

## Platform

C programming in Unix

Skills: C Programming, C# Programming, Engineering, Linux, MySQL, PHP, Software Architecture, Software Testing, UNIX

See more: switch c programming, read and write the words, perform line, objective of c programming, c# read and write text file, c programming switch, objective c programming, absent , read and, perform, operations, it operations, php read text file, list ascending, read file error number, file sort, sorted list, space analysis, analysis space, php file operation, read option specified file, word frequency file, read ascii text file, write use cases, word frequency text file

Project ID: #3089524

18 freelancers are bidding on average $34 for this job

emilianbold

See private message.

$21.25 USD in 14 days
(78 Reviews)
5.8
vw542790vw

See private message.

$38.25 USD in 14 days
(64 Reviews)
5.5
ironhero

See private message.

$85 USD in 14 days
(14 Reviews)
5.4
vw945025vw

See private message.

$34 USD in 14 days
(30 Reviews)
5.1
shahizanvw

See private message.

$29.75 USD in 14 days
(46 Reviews)
4.6
vw945703vw

See private message.

$49.3 USD in 14 days
(22 Reviews)
4.2
eugenenikanorov

See private message.

$25.5 USD in 14 days
(12 Reviews)
3.6
vasanthmanickam

See private message.

$25.5 USD in 14 days
(7 Reviews)
2.9
yevgenyt

See private message.

$29.75 USD in 14 days
(9 Reviews)
2.6
cadencevw

See private message.

$15.3 USD in 14 days
(9 Reviews)
2.3
ariyski

See private message.

$27.2 USD in 14 days
(2 Reviews)
1.9
milosredkov

See private message.

$25.5 USD in 14 days
(2 Reviews)
0.7
rprokop

See private message.

$8.5 USD in 14 days
(4 Reviews)
0.6
theoraclevw

See private message.

$42.5 USD in 14 days
(0 Reviews)
0.0
israroramooz

See private message.

$12.75 USD in 14 days
(0 Reviews)
0.0
programmer75

See private message.

$85 USD in 14 days
(0 Reviews)
0.0
adrianaavw

See private message.

$6.8 USD in 14 days
(0 Reviews)
0.0
screwvw

See private message.

$42.5 USD in 14 days
(3 Reviews)
0.0