Suppose we have this main:
int main(int argc,char *argv[]){
}
How could I manage to get the elements of *argv[],in order to extract some statistics off of each one(e.g letter count,numbers ,etc.)?
I have tried couple of things but didn't work(using pointers ).Eventually I tried a work-around,using strcpy() to copy each element of the array and that worked. So my question is,are there other ways to achieve that?
Here's an example of my code that works:
int main(int argc,char *argv[]){
char temp[50];
strcpy(temp,argv[1]); //extracting the first element of the array.