answersLogoWhite

0


Best Answer

int main(int argc, char** argv) { char *argument1, *argument2; if (argc < 2) ...{exception}... argument1 = argv[1]; argument2 = argv[2]; } Note: It is up to you to decide if the arguments actually refer to valid filenames. Also, if the filenames contain spaces, this example will not work - you would need to write code to parse (or use library routines) and support quoted filenames.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How to write a program that accepts two file names as command line arguments?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you create a program that can input 100 names using flowchart?

create a program that can input 100 names


What is the command of list of user names who have currently logged in?

who command gives the list of users who have currently logged in......


Are program names such as teacher support program capitalized?

yes


What was the name of the American spaceships used in the trips to the moon?

The program was called Apollo, and the missions designated with a number. Apollo 11 was the first to land on the moon. The command and lunar modules were all given different names by their crews.


Write a shell program called whos to display a sorted list of the logged in usersJust display the user names and no other information?

The 'users' command should do that; you don't need to write a shell script to get that information in that format.


What are the names of the currently serving justices who heard the arguments regarding the constitutionality of the healthcare plan?

justice Hudson


What are other names for traditional economy?

command economy


Why is it possible to use the same variable names for actual and formal arguments in c language?

1. Because they are completely unrelated names. 2. Because there is no rule against them having the same names.


From where Acute Email IDs production engine can be downloaded?

Hi..If u have once checked with ACUTE EMAIL ID, you would see that , it only accepts one text file with only names and rest parts like Domains and suffix and prefix are need to be written manually in order to get emails , I have coded the program in which you can import Names, Suffix, Prefix and Domain Names all at once in form of TEXT files and can generate millions of number of Email Address at once in few seconds.Thats what the Enhancement I have done to ACUTE Program. I am looking to sell this program soon on my personal Web. :) CN : h.rockz AT Y! .com


What is the watermelons common names?

watermelons command name is a fruit or a green fruit


What command would you type to see a list of cached host names?

HOSTS


How are subdirectory names identified by DOS?

Try the TREE command at the DOS prompt