Computer Science, asked by rah52792, 10 months ago

flowchart for command line arguments in c​

Answers

Answered by mayankdaiya23
0

Answer:

Let's see the example of command line arguments where we are passing one argument with file name.

#include <stdio.h>

void main(int argc, char *argv[] ) {

printf("Program name is: %s\n", argv[0]);

if(argc < 2){

printf("No argument passed through command line.\n");

}

else{

printf("First argument is: %s\n", argv[1]);

Explanation:

Similar questions