Explain the command line parameters, C/C++ Programming

Explain the Command Line Parameters?

The Command line arguments are parameters supplied to a program from the operating system. These arguments are parameters accepted to main function from the operating system. Most versions of C programming permit two such arguments which are called argv and argc, respectively. The argc must be an integer type variable and the argv is an array of pointers to characters that is the array of strings. Every string in this array will represent a parameter that is passed to main. The value of argc will point to the number of parameters passed.

The universal form of main function will be in the form:

main (int argc, char *argv[ ] )

A program execution is detained by specifying the name of the program within a menu-driven environment. Some compilers as well permit s program to be executed by specifying the name of the program at the operating system level. The name is after that interpreted as an operating system command. Therefore the line in which it appears is generally referred to as a command line. 

Posted Date: 6/14/2013 1:57:23 AM | Location : United States

Related Discussions:- Explain the command line parameters, Assignment Help, Ask Question on Explain the command line parameters, Get Answer, Expert's Help, Explain the command line parameters Discussions

Write discussion on Explain the command line parameters
Your posts are moderated
Related Questions
Write a program consisting of two functions (plus main). The first function should read in a number and then pass this back to main. This value should then be passed into a secon

Create a mathematical number guessing game. Have the user prompt for the number of games that they want to play. Then each game consists of the following rules. a. The computer

Write a Program to illustrate passing structure to function? # include struct customer { int id; char name[15]; }; void func_struct(struct customer); main() { struct c

#include stdio.h   struct  complex   {   float real;   float imag;   };   struct complex complexadd(struct complex,struct  complex);   void main()     {          Date: 26

In which condition a template a better solution than a base class? A: While you are designing a generic class to contain or manage objects of other types, while the format & beh

What is the role of && operator in a program code? - && is also referred to as AND operator. - When this operator is used, all conditions specified should be TRUE before nex

A Constructive Example Consider an example , to model a user-defined data type for  strings. The object simulates a character array ( string ) using a character pointer and an

write a class player that contain attributes for the player,s name,average and team

I''m having trouble with my C code to red from a Hash table. Not sure what it is I''m doing wrong and stumped. I need to get it figured out by tomorrow at 4:00 p.m. Eastern time. C

how to compare one file with another file. comparison should be like first line of first file compare every line of second file until it gets a blank line starting from the top and