getopt.h #20
-
Use of |
Beta Was this translation helpful? Give feedback.
Answered by
chandrakant100
Jun 1, 2022
Replies: 2 comments
-
The
Return Value: The getopt() function returns different values:
src -> link. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
chandrakant100
-
RETURN VALUE
https://pubs.opengroup.org/onlinepubs/009696799/functions/getopt.html |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
getopt()
function is a builtin function in C and is used to parse command line arguments.Return Value: The getopt() function returns different values:
pointer
to the external variableoptarg
.-1
if there are no more options to process.?
when there is an unrecognized option and it stores into external variable optopt.?
.By placing a colon as the first character of the options string, geto…