For example if my program name is test.c
Then for the following run command the argc = 2 instead of 4.
$test abc pqr* *xyz*
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It is probably because your shell / cmd.exe (no specifics are given!) use the
*as file glob. If there are no files found that match the glob, the result will be empty.Try calling you program like this:
refer to http://en.wikipedia.org/wiki/Glob_%28programming%29 for details about globbing, and your shell’s manual for details about escaping globs.