C/C++ Create Directory

We can type “mkdir dirname” command at konsole to create dirname directory. If we can create a directory from C/C++ we can use command mkdir(path, mode) to create directory. Example :

Save code with name main.c and compile code with command :

gcc main.c -o createdir

type  ./createdir at konsole to running program. When you running this program, program createdir will create pathname folder.

Source :
One Comment

Add a Comment

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.