#include <iostream.h>
#include <conio.h>
void main ( int argc , char *args[] )
{
cout << " Number Of Arguments : " << argc << endl ;
for ( int i=0 ; i<argc ; i++ )
{
cout << "arg["<<i<<"]: "<<args[i] << endl ;
}
}
How this works, we know that the main() method is the gateway to a C/C++ program, as this is a method, and methods can have parameters. We difined a main method with parameters.
No comments:
Post a Comment