Open the command prompt in window OS. (Type CMD in Run)
In the command prompt type notepad and press enter key you will get the notepad. Since it executes notepad.exe
Repeat the same task but now first create any .com file in the same working directory. We can create it as open the notepad save it as notepad.com, set save as type is All files or we can create the .com file from command prompt.
Then type notepad in command prompt and press the enter key you will get error message like: