What happens when you type ls *.c

When it comes to working in Terminal (the command user interface for Mac OS X) you’re able to type and execute commands through an environment call the Shell. These commands such as ls, cd, pwd consist of there own actions which are ran in the shell prompt using options and wildcards to assist in the execution. Options such as -l, -a, -n are helpers that modify the behavior of a command. Wildcards are special characters such as /,?,* that allow you to select files or directories based on how there used. So what would happen if you were to type ls *.c? The ls command is used to list the files in the working directory. The special character * is a wildcard that matches any character. The .c is to represent files that end in .c. So when ls *.c is type in the shell it will list all files ending .c