What happens when you type ls *.c

ls is a bash command in which you execute within your terminal. It will display a list of information within your current directory.

* is a wild card. It is a special character that will match with any character. If you write characters before *, you will be selecting character that start with that character. If you write characters after * you will be selecting characters that end with the characters.
example#1: *.c will target all files and directories that ends with a .c
example#2: L* will target all files and directories that begin with L
NOTE: the letters are case sensation.
Let’s look at the example in the picture above. It lists Desktop, Documents, Downloads, Library, Lollipop, Look, Movies, Music, Pictures, Public, apple, example.txt, fo.c, yum.c as the files and directories.
So what you run ls *.c, the command will display a list of the current files and directories in bash. We should expect to get all the files that end in .c which should be fo.c and yum.c

And if you look at the image above, you can see that we have indeed produced these results.