can any body explain it to me plz.
can any body explain it to me plz.
int main(int argc, char** argv)
do you mean that or explaining how that works?
The runtime or whatever executed the program parses and sends the command line arguments. For example a program in DOS is executed: DOS takes the command, parses it, tokenizes it and sends it to the client program's main.
You could always read the nice little FAQ. But then, you'd be the first person to ever actually read the thing...
Quzah.
Hope is the first step on the road to disappointment.
i wanted to know at time of compilation how the program behave and how the memory is utilized ,also how the compiler behaves to it.
"The New Testament offers the basis for modern computer coding theory, in the
form of an affirmation of the binary number system. But let your communication
be Yea, yea; nay, nay: for whatsoever is more than these cometh of evil."
- Matthew 5:37
The point is quite simple. the reason C has int main() and int main(int, char **) is so that you don't have to re-write code for every OS you bring your program to. For example, in windows programs you would use WinMain(). WinMain() doesn't have a char **argv parameter it has a single dimensional string that you get to parse yourself. Your compiler hides (for lack of a better term) the part where a program takes a string from the OS shell and spits out char **argv.