GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  Programming  >  Java
Go To First  |  Previous Question  |  Next Question 
 Java  |  Question 4 of 928    Print  
What is the difference between java command line arguments and C command  line arguments

  
Total Answers and Comments: 4 Last Update: December 12, 2006   
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: sailaja
 
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.

Above answer was rated as good by the following members:
Krishna Jeevan
July 06, 2005 01:22:41   #1  
sailaja        

RE: What is the difference between java command line arguments and C command  line arguments
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.
 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
July 16, 2005 14:10:34   #2  
amal chacko        

RE: What is the difference between java command line arguments and C command  line arguments
What is the difference between java command line arguments and C command line arguments
 
Is this answer useful? Yes | No
September 13, 2005 05:18:15   #3  
Mohan        

RE: What is the difference between java command line ...

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


 
Is this answer useful? Yes | No
December 12, 2006 03:57:37   #4  
murali        

RE: What is the difference between java command line ...
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.
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape