Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

Use onlinegdb.com and please submit a final code at the end, ( JUST ONE BIG CODE ) Write a C program myls 2 whose behavior

Use onlinegdb.com and please submit a final code at the end,(JUST ONE BIG CODE)
Write a C program myls2 whose behavior resembles that of the system command 1 s. myls 2 must print
the names of files in the current directory in columns of equal width. my 1.s2 must accept the following
parameters:
$ myls2[-ars][directory]
Overall behavior of my 1s2 is identical to that of myls 1 described in lab5.
myl.s2 needs to present its output using multiple columns of the same width as shown below:
Use the hint on p.164(Molay textbook) to determine the width of the current terminal window.
Test my1s2 using the files with names of varying length archived in this ZIP file. Use the following test
cases when running myls 1 from the directory at the same level with dirA:
Run each of the test cases above twice:
in a relatively wide terminal window resulting in at least two rows of file names, and
in a relatively narrow terminal window resulting in at least four rows of file names.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions