I have this program execute with the values 10,20,30 given at command line.
int main(int argc , char **argv)
{
printf(\"\\n Printing the arguments of a
argc will have number of elements which can be accessed from argv[0] to argv[argc-1].
So modify your condition accordingly viz print from argv[argc-1].
Here is a command line arguments tutorial link as there are many things which you may have missed when reading it. Hence you are not able to understand the reason for that output.
Numbering for indexes is usually from 0, because of many reasons. Please check this question which will help you understand why its zero based. https://stackoverflow.com/questions/393462?tab=votes&page=1#tab-top