Can you explain me and describe me whats that code doing? Especially that first and last line, not that one(I dont know what is that number 10, why is there). Thanks.
1 2 3 4
int main(int argc, char** argv)
{
char odp1,odp2,rozhodnutie;
char name[10];
Thank you very much, I understood about that number 10, but by first line I meant int main.. I am not sure why there are that agrc, char++ and agrv in brackets..is this needed?
It's used for reading command line arguments that are being passed to your program.
argc is the number of arguments.
argv gives you access to the list of arguments.
./yourprogram arg1 arg2
If you run your program like this argc will have the value 3. argv[0] will contain the name used to invoke the program "./yourprogram". argv[1] contains the second argument "arg1", and argv[2] contains the third argument "arg2".