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 |
6)What would be the output? main() { int u=1,v=3; pf("%d%d",u,v); funct1(&u,&v); pf("%d%d\n",u,v); } void funct1(int *pu, int *pv) { *pu=0; *pv=0; return; } a)1 3 1 3 b)1 3 1 1 c)1 3 0 0 d)1 1 1 1 e) 3 1 3 1
What is difference between union and structure in c?
When was c language developed?
is c language is a object oreinted language?
Are global variables static in c?
What is gets() function?
write a program to gat the digt sum of a number (et. 15= >1+5=6)
write a program in c language for the multiplication of two matrices using pointers?
what is a function pointer and how all to declare ,define and implement it ???
What is difference between class and structure?
How can I rethow can I return a sequence of random numbers which dont repeat at all?
What are pointers in C? Give an example where to illustrate their significance.