*argc *:- represent the number of things you entering into the command line when running this program in a terminal.
argv[] :- is an array that hold the string values of the things we were entered on the command line when running this program in a terminal.
example on argc
this is the code
now after compile and run
notice ./argc.o
give you value 1
when you enter other value next to it , it gives you the number of it , and also what is between these practice " " is only is only one value
now argv
argc gives the number of intered value
argv gives the value the entered as string
if i will enter some numbers and want to sum them, so i need to turn this string to in , i will use atoi for it
the answer
Top comments (0)