My task is to write a another small version of LS command. I successful read a directory and stored names of files into an sorted array. My question is how do I print out them in a column format. And how to use system call ioctl() to help me with the format?
$ ls
file.txt file2.txt file5.txt file8.txt
file0.txt file3.txt file6.txt file9.txt
file1.txt file4.txt file7.txt