answersLogoWhite

0

there are only one type ie main( int argc , int argv[]).

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

How do you pass command line arguments using turbo in c compiler?

In the Options menu the Arguments command.


What is java command?

A Java application can accept any number of arguments from the command line. This allows the user to specify configuration information when the application is launched.The user enters command-line arguments when invoking the application and specifies them after the name of the class to be run.


Can a Java program use one or more command line arguments?

Command line arguments in Java are, as with most programming languages, a way to give information to a program at the point of invoking (starting to run) that program. The information is given in the form of a text string. Command line arguments are accessible in a Java program as an array of String objects passed into the program's "main" method. Unlike some programming languages (such as C/C++), where the command used to invoke the program is passed into the first array location (index 0) and the arguments subsequently, in Java the first argument occupies index 0. Command line arguments are a useful way of gathering information from the user when it is likely will know the information at the start of the program. For example, a Java application might copy a file from myFile.txt to myNewFile.txt by running the command "java CopyUtil myFile.txt myNewFile.txt". It is useful to allow such information to be passed in via command line arguments to make the program more scriptable: in other words, more conducive to scripted invocation, through a Desktop shortcut, through a batch file, through a shell script, etc.


Does there exist any way to make the command line argument available to other function without passing them as arrguments to function?

The only way this can be achieved is by storing the command line arguments in global variables. However, this is not recommended. Global variables should only be used to represent truly global concepts, but command line arguments are local to the main function. The main function's primary role is to parse the command line arguments and invoke the appropriate functions, passing any required arguments (by value) to those functions that specifically require them. The main function's secondary role is to handle any exceptions not handled by the functions that it invokes.


How many characters can be taken as command line arguments?

Platform dependent. Many in unix, few in WinDos.

Related Questions

Definition of commandline arguments?

Hii I am Ajay Kumar MCA Student A Java application can accept any number of arguments from the command line. The user enters command-line arguments when invoking the application and specifies them after the name of the class to be run.


How do you pass command line arguments using turbo in c compiler?

In the Options menu the Arguments command.


What is java command?

A Java application can accept any number of arguments from the command line. This allows the user to specify configuration information when the application is launched.The user enters command-line arguments when invoking the application and specifies them after the name of the class to be run.


How do you use the top command in Linux?

Just type "top" into the command line. It requires no arguments. To exit, press 'q'.


Can a Java program use one or more command line arguments?

Command line arguments in Java are, as with most programming languages, a way to give information to a program at the point of invoking (starting to run) that program. The information is given in the form of a text string. Command line arguments are accessible in a Java program as an array of String objects passed into the program's "main" method. Unlike some programming languages (such as C/C++), where the command used to invoke the program is passed into the first array location (index 0) and the arguments subsequently, in Java the first argument occupies index 0. Command line arguments are a useful way of gathering information from the user when it is likely will know the information at the start of the program. For example, a Java application might copy a file from myFile.txt to myNewFile.txt by running the command "java CopyUtil myFile.txt myNewFile.txt". It is useful to allow such information to be passed in via command line arguments to make the program more scriptable: in other words, more conducive to scripted invocation, through a Desktop shortcut, through a batch file, through a shell script, etc.


Does there exist any way to make the command line argument available to other function without passing them as arrguments to function?

The only way this can be achieved is by storing the command line arguments in global variables. However, this is not recommended. Global variables should only be used to represent truly global concepts, but command line arguments are local to the main function. The main function's primary role is to parse the command line arguments and invoke the appropriate functions, passing any required arguments (by value) to those functions that specifically require them. The main function's secondary role is to handle any exceptions not handled by the functions that it invokes.


How do am pass arguments in public static void main?

By using command line arguments we can pass values to the static void main method at the time of running the Java class. For example: if Class name is A,then to run this class and accepts command line then run this by using below line java A <argument1> <argument2> ....


What is the purpose of using echo command?

The echo command echoes out any of the command line arguments given to it. It is commonly used in shell scripts to echo what portions of the shell script are doing.


How do you use Task Manager to find the run-line command for many types of software?

How do you use Task Manager to find the run-line command for many types of softwar


What is the maximum no of arguments that can be given in a command line in C?

C doesn't limit it, it handles as many parameters as it gets.


How do you find command line arguments as integer in shell scripting?

In shell scripting, command line arguments can be accessed using the special variable $1, $2, etc., where $1 refers to the first argument, $2 to the second, and so on. To treat these arguments as integers, you can use arithmetic expansion with the (( )) syntax. For example, you can perform calculations like sum=$(( $1 + $2 )) to add the first two arguments. Ensure the arguments passed are valid integers to avoid errors during arithmetic operations.


How do you give command line arguments while running a program in Linux?

Different commands can have different syntaxes. The most common format is 'command -a -b -c -d' or 'command -abcd'. Commands with long options will also support the syntax 'command --option --option2 --coption3'.