0
How to put argv in comma sepearted
*char argv = [one, two, ...] argc = 4 *Segmentation fault https://code.sololearn.com/c1jVW2Z2dx4q/?ref=app
5 Answers
+ 2
Your loop condition argc-1 => 2-1 = 1 is always true. So causing segmentation fault.
Use i < argc
+ 1
At least you have seen the code that you posted?
+ 1
Thks its worked u solved it
0
And it run?
0
~ $ ./arg one two three
argc = 4
Segmentation fault