How do I access command-line arguments?

Answer Posted / srujana

we can access the command-line arguments by passing the
arguments argv and argc on to the main() function where
argv represents an array of pointers to strings and argc
holds the int value which is equal to the number of strings
that are in argv

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER

1637


What is the use of ?: Operator?

895


Here is a good puzzle: how do you write a program which produces its own source code as output?

849


write a program in c language to print your bio-data on the screen by using functions.

6530


Explain how can I right-justify a string?

814


Why is sizeof () an operator and not a function?

772


Why we use void main in c?

834


How do you convert strings to numbers in C?

929


How do you determine whether to use a stream function or a low-level function?

911


Explain how do you determine a file’s attributes?

821


What is difference between array and structure in c?

791


Why do we use int main instead of void main in c?

903


What is a lvalue

872


How can you find the day of the week given the date?

851


What's the best way of making my program efficient?

829