Ask Sawal

Discussion Forum
Notification Icon1
Write Answer Icon
Add Question Icon

Lom Nalini




Posted Questions


No Question(s) posted yet!

Posted Answers



Answer


A post graduation diploma course for aspiring yoga teachers. The aim of this course is to train and prepare" · Uploaded by Kaivalyadhama Yoga Institute


Answer is posted for the following question.

What is pg diploma in yoga?

Answer


The Stellar price, Lumen (XLM) to USD price, real-time charts, news and videos. Learn about XLM, crypto trading and more."Stellar · Stellar's XLM Token Rallies to... · After GME, Dogecoin and · Mt. Gox


Answer is posted for the following question.

What is stellar lumens trading at?

Answer


Type 1 diabetes causes. Type 1 diabetes is caused by the immune system destroying the cells in the pancreas that make insulin. This causes diabetes by leaving


Answer is posted for the following question.

Why do diabetes occur?

Answer


Great Southern Cafe — 83 Central Sq, Seaside, Fl, Santa Rosa Beach, FL 32459-0808 ... Vegan Options, Gluten Free Options Breakfast, Lunch, Dinner,


Answer is posted for the following question.

What is the best place to eat in santa rosa beach fl?

Answer


The FIFA Mobile database that suits your needs! Filter all FIFA Mobile 20 (season 4) players, compare them, build and share squads and much more


Answer is posted for the following question.

What is the best lw in fifa mobile 20?

Answer


How do you say Zauq? Listen to the audio pronunciation of Zauq on pronouncekiwi.


Answer is posted for the following question.

How to pronounce zauq?

Answer


Less than two months after buying the XFL , Dwayne "The Rock " Johnson has announced when the league will be making its return


Answer is posted for the following question.

Why did the rock buy xfl?

Answer


With benefits to cover trip cancellation, medical expenses, and even travel inconveniences like lost luggage, travel protection is a smart way to help guard


Answer is posted for the following question.

What does travelers insurance cover?

Answer


The modern history of the oil and gas industry started in 1847, with a discovery made by Scottish chemist James Young. He observed natural


Answer is posted for the following question.

Where is oil and gas industry from?

Answer


Ever thought to make directories without the usual right-click functionality in the operating system?, you can do that by another way which is through command line! The "mkdir" command is exactly made for that!. The "mkdir" command stands for "make directory/ies" . This is an inbuilt command in the UNIX based filesystems and is widely used for saving time by following the usual right-click creation method, let's dive into implementation of the "mkdir" command,

The initial setup follows the usual setting up of C++ file, so create a file named "mkdir.cpp" and here we will write our implementation code,

After the correct setup the directory tree will look like this,

For the implementation of the logic we will need several header files, namely,

Then let's move to the implementation part,

Now we'll require command line arguments for the successful execution of the command. So we'll define the main function with arguments as,

What this does is allows the user to pass the names through command line, such as the name of the directory to be created, so at the time of execution we could pass the name as,

Here argv signifies the list of arguments passed,

Now we'll use the prebuilt function mkdir in C++ to create a directory, this function takes two arguments, the first one being the filename and the second one is the file permissions for user,group and others.

The permissions 0777 stands for the permission type, 7 stands for the user permissions that the user could read, write, and excute the file. If the file is not present the function will create a directory, else will return -1. The argument argv[1] stands for the directory name that you want to be created here for example we are going to use test as the argv[1] but you could use it as anything you wish for.

Now what if the directory doesn't exist? You guessed it right! We'll create one!

So the complete implementation of the file will look like,

For running the file, we'll use terminal, or you could do it with any compiler of your choice,

Here I'll use terminal and make command to compile the file,

Then to run the file we'll use ./mkdir along with the filename,

Now by listing the filesystem we could see that the directory named test has been created!


Answer is posted for the following question.

How to call mkdir in c?


Wait...