My schools did not teach C or any language like it.
I learned about -- and #getopt from a combination of FidoNet, Usenet, and a 1985 book on Unix by Eric Foxley.
The habit of using -- probably cemented when I wrote a load of command-line utilities for DOS and OS/2 in the 1990s which all supported an end-of-options marker in their command-tail parsing library.
https://groups.google.com/g/comp.os.os2.utilities/c/415LDKL3_Lw/m/P9tPDLd7VAUJ
I made use of what my own tools could do. (-: