How do I access command-line arguments?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / reejusri
In order to access the command arguments, the main()
function must have a prototype similar to the following.
int main(int argc, char * argv[])
The names argc and argv are usually used for the
parameters, but a programmer could use different names.
| Is This Answer Correct ? | 6 Yes | 4 No |
formula to convert 2500mmh2o into m3/hr
Is r written in c?
What are the disadvantages of c language?
Write a program in c to input a 5 digit number and print it in words.
WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..
What is the use of bitwise operator?
What is a symbolic constant?
What is the difference between array and structure in c?
what is difference b/w extern & volatile variable??
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
What's the total generic pointer type?
Write a program to find factorial of a number using recursive function.