6

C/C++ Program to Create Folder and Directory

 2 years ago
source link: https://www.geeksforgeeks.org/videos/c-cpp-program-to-create-folder-and-directory/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

C/C++ Program to Create Folder and Directory

C/C++ Program to Create Folder and Directory
  • 910 Views
  • 09/08/2022

In this video, we will write a C++/C program for creating a folder and directory. 

A directory or folder is a location on a disk used for storing data related to particular files. You can sort your files into groups and place each related group into its own directory. This means you do not have to search a complete disk to find one type of file. 

In C++/C this task can be accomplished by using the mkdir() function. Directories are created with this function.

The mkdir() function creates a new, empty directory with the name filename. 

Method: 
// mkdir() function 
int mkdir (char *filename) 

After execution of the program if the return value of 0 then it indicates successful completion, otherwise -1 indicates failure.

Create Directory or Folder with C/C++ Program:
https://www.geeksforgeeks.org/create-directoryfolder-cc-program/


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK