What is the difference between java command line arguments and C command  line arguments

Showing Answers 1 - 6 of 6 Answers

sailaja

  • Jul 6th, 2005
 

In C and C++, the system passes two arguments to a program: argc and argv. argc specifies the number of arguments stored in argv. argv is a pointer to an array of characters containing the actual arguments. In Java, the system passes a single value to a program: args. args is an array of Strings that contains the command-line arguments.

amal chacko

  • Jul 16th, 2005
 

What is the difference between java command line arguments and C command line arguments

  Was this answer useful?  Yes

Mohan

  • Sep 13th, 2005
 

In C the argument counter starts from the program name itself.

But in the case of  Java the argument count starts after the classname

for eg: java testArg rao rao1

the arg[0] is "rao " here(in Java )

But in the case of C it comes to "testArg"

 

  Was this answer useful?  Yes

murali

  • Dec 12th, 2006
 

 In c,there are argc and argv.argc is passed to argv and argv is used to store characters.in java there is only args.we pass a String value to it.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions