Question: Given the template code, copyConvert . c , fill up the marked portion so that your program is performing the following tasks: Read from input
Given the template code, copyConvertc fill up the marked portion so that your program is performing the following tasks:
Read from input file from the string pointed by argv
Replace every occurrence of a lowercase char with that of an uppercase char.
Write the converted file contents into another file pointed by argv
You are allowed to use only the system calls covered in the class eg read write open close You cant use library calls such as fread fopen fwrite etc. If you dont follow this requirement, you will get significant penalty!!
You can compile this program as was discussed in the class:
$ gcc o copyConvert copyConvert.c
After the compilation you need to run your program with two file names as commandline arguments such as:
$copyConvert filetxt filetxt
Then your program is supposed to create another file filetxt from the existing file filetxt after replacing each occurrence of a lowercase character with an uppercase character.
For example, if your input file, filetxt contains:
GAILY bedight,
A gallant knight,
Then, the output file, filetxt should contain:
GAILY BEDIGHT,
A GALLANT KNIGHT,
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
