What does int argc, char* argv[] mean?

  Рет қаралды 348,955

Paul Programming

Paul Programming

9 жыл бұрын

In this tutorial I explain the meaning of the argc and argv variables that are often passed in the main function of a C or C++ program.
Want to learn C++? I highly recommend this book amzn.to/1PftaSt
Donate - bit.ly/17vCDFx
STILL NEED MORE HELP?
Connect one-on-one with a Programming Tutor. Click the link below:
trk.justanswer.com/aff_c?offe...
:)

Пікірлер: 310
@hass89
@hass89 7 жыл бұрын
Argc is ARGument Count and and argv is ARGument Vector.
@felipemartin8255
@felipemartin8255 7 жыл бұрын
And "Vector reffers to an array, not a C++ or Euclidean vector" See reference here: www.cplusplus.com/articles/DEN36Up4/ Ps.: Although the name of the site be cpluplus.com, all the teachings contained there are compatible with C.
@dronebee
@dronebee 6 жыл бұрын
Kingsman is KINGdom's MAN.
@lovemoreanime6981
@lovemoreanime6981 6 жыл бұрын
is he managing directory by programming ?
@makara2711
@makara2711 3 жыл бұрын
what are counts and vectors in C?
@Phantom-fi8sc
@Phantom-fi8sc 3 жыл бұрын
@@makara2711 I tried to print the argv it shows the path of some designated file
@Rookwie
@Rookwie Жыл бұрын
I couldn't understand this for so long, I read some stack overflow, watched some tutorials, looked up some problems and nothing helped until I found this video, great explanation!! Feels way better to finally understand this
@mikroelektro
@mikroelektro 8 жыл бұрын
Never understood it until I saw you video 👌👍
@mustafaadam9697
@mustafaadam9697 8 жыл бұрын
You CAN declare a variable inside a for loop in C. Just use C99 or C11.
@nicolareiman9687
@nicolareiman9687 4 жыл бұрын
@Artem Katerynych It's a standard that the compilers have to follow. it's not a version
@nicolareiman9687
@nicolareiman9687 4 жыл бұрын
@Artem Katerynych Well technically we're both late.
@316monisbandey3
@316monisbandey3 3 жыл бұрын
@@nicolareiman9687 yes
@NateROCKS112
@NateROCKS112 2 жыл бұрын
@@nicolareiman9687 it is a version, if you define it to be "[a] particular form or variation of an earlier or original type" (American Heritage Dictionary, 5th Edition). It's not a version of a particular C implementation -- such as a compiler or standard library -- but it is a version of the C language. Edit: And I'm also a year late, lol.
@redemedy8602
@redemedy8602 2 жыл бұрын
i was about to. To be honest i dont get why ppl dont use c99. I just dont get it. If anyone can explain i will apreciate it alot
@reneezmp
@reneezmp 2 жыл бұрын
Hey Paul, I'd like you to thank for putting your energy into making this tutorial. It was really enlightening and it made me comprehend the concept much better. Keep up the awesome job.
@jahitrst2863
@jahitrst2863 3 жыл бұрын
This scared me in the past to start with c++, but it's actually such a simple concept.
@86jam184
@86jam184 10 ай бұрын
I want this guy to explain literally everything in my life
@tonyblue5057
@tonyblue5057 Жыл бұрын
You are literally the best my professor expected most of us to know c and it took me about 2 weeks on an assignment because i couldn't figure this out but bc of u i have been able to solve the task on the assignment. Thank u.
@edwardmacnab354
@edwardmacnab354 2 жыл бұрын
This is the clearest explanation I have ever seen on this particular item !
@morenoramalhofreitas5688
@morenoramalhofreitas5688 6 ай бұрын
Awesome video! I'm brazilian and I want you to know that your video are healping people from all around the world! Thank you very much!
@johncusack4730
@johncusack4730 Жыл бұрын
Man, you are amazing! You really know what you're doing. Please, don't stop!!!
@MaTTeO29c
@MaTTeO29c 4 жыл бұрын
Thank you for your video! I'm French and it's super easy for me to understand everything. You took your time to be understandable and thank you so much for that!
@mistakenmeme
@mistakenmeme 3 жыл бұрын
I remember being so intimidated by this when I started learning C++. But then I learned that I didn't need it at all and I forgot about it completely.
@ibrahimozmen9668
@ibrahimozmen9668 2 жыл бұрын
so do i have to learn this or what bro i am a cs student who are a completely beginner :)
@mistakenmeme
@mistakenmeme 2 жыл бұрын
@@ibrahimozmen9668 unless you are building commandline applications for Linux or old terminal based systems, you don't need to worry about it.
@ibrahimozmen9668
@ibrahimozmen9668 2 жыл бұрын
@@mistakenmeme thanks bro. I just wanted to learn how it works
@AZUBUIKETHANKGOD-wp2ri
@AZUBUIKETHANKGOD-wp2ri 11 ай бұрын
Quite a lucid explanation. Thanks Paul for making such an awesome video. You've gained a subscriber.
@eatyourspinachtomperez8700
@eatyourspinachtomperez8700 7 жыл бұрын
Thx Paul. I recall Jullian Assange saying, "commitment requires sacrifice, courage is contageous". (The latter meaning if you surround yourself w/ your peers, courage is contageous). This said, while learning to code, (we're ALWAYS students however), we forget previous lessons etc, the "commitment" part is, constantly reviewing what we may forget. This said, THANK YOU for your great work here on KZbin. Cheers T
@juliedurbin4465
@juliedurbin4465 6 жыл бұрын
This video was so helpful with understanding my embedded systems homework. Your video really clears some things up. Thanks so much!
@jalalbounaim
@jalalbounaim 2 жыл бұрын
Very clear, concise, to the point, intelligible. Many thxs
@jesusnoseke4038
@jesusnoseke4038 4 жыл бұрын
I have been searching so much for this, even my book doesn't explain what is this, thx a lot
@VietCong467
@VietCong467 6 жыл бұрын
Brilliant explanation, Paul! You just got yourself a new subscriber!
@johnnywonglw2351
@johnnywonglw2351 6 жыл бұрын
SO WELL-EXPLAIN that I just signed in to give you a thumb-up!!! Thank you for the clear explanation.
@makunenbrawl7995
@makunenbrawl7995 3 жыл бұрын
That's very simple by listening you. Love the away you explain think. Nice work
@TheDavidlloydjones
@TheDavidlloydjones 5 жыл бұрын
Paul, A nice clear intelligent presentation. Well done and thank you! (Props also to Hassanin Ahmed, below.)
@hoanghieu6389
@hoanghieu6389 8 жыл бұрын
excellent explain.
@cinarioan2766
@cinarioan2766 4 жыл бұрын
so clear and excellent explanation. Just to mention that the arguments must have a space or TAB between them and not a ; or ,
@puertea2537
@puertea2537 7 жыл бұрын
Oh my god you are my hero!!! thank you so much bro... subscribed already
@tinal3991
@tinal3991 Жыл бұрын
Explicitly explained! Thank you paul!
@LapCreativeStudio
@LapCreativeStudio 2 жыл бұрын
always provide notes to things you have spoken makes us understand better okay 👍 thank u so much for your efforts love from india
@kebsem
@kebsem 8 жыл бұрын
Thank you very much. The video was clear, easy to understand, and helpful!
@shadyfixtech4763
@shadyfixtech4763 Жыл бұрын
Well explained Paul. Thanks.
@sidharths9416
@sidharths9416 4 жыл бұрын
No words to explain. !!! Thanks a lot!!!!!
@celestinemachuca2339
@celestinemachuca2339 3 жыл бұрын
thanks, i sleep thru my last lecture, this clears a lot!
@adam3416
@adam3416 6 жыл бұрын
finally the first helpful vid on this topic!
@faithabike664
@faithabike664 Жыл бұрын
Thanks Paul for this insightful video 😊.
@s.spambot9095
@s.spambot9095 2 жыл бұрын
OMFG I was reading about this for like 1 hours and couldn't understand shit, and you made it so clear!!! Thank you!!
@leedavis7143
@leedavis7143 7 жыл бұрын
perfect lecture!~thank you, Paul~~~~~
@Kader_1
@Kader_1 11 ай бұрын
Thank you, very clear and concise explanation.
@frostypawsgaming1338
@frostypawsgaming1338 7 жыл бұрын
Cool, this confirmed my book seemed weird that it said this had to double check. good job.
@Slausonkidd
@Slausonkidd 8 ай бұрын
You just got a new subscriber thanks Paul
@RCBajafreak
@RCBajafreak 9 жыл бұрын
Perfectly explained, thx a lot bro!
@anonimosilva6723
@anonimosilva6723 6 ай бұрын
Thank you for this excential explanation!!
@mixagames5425
@mixagames5425 3 жыл бұрын
Thanks, this has confused me and I have it on my exam. You cleared it up :)
@simonfoo96
@simonfoo96 2 жыл бұрын
Thanks for this tutorial!!! It helps a lot!
@jm52SD
@jm52SD 6 жыл бұрын
EXCELLENT video, just subscribed. thanks
@qwerasdfhjkio
@qwerasdfhjkio 4 жыл бұрын
Did you make a C programming tutorial? You explanations are so clear
@tuananh284220
@tuananh284220 3 жыл бұрын
I learn something today! Good explanation. Thanks!
@6183134
@6183134 8 жыл бұрын
(In C programming it is not necessary to put in a for loop the type of the value...) Very good tutorial!!
@shashamnk2525
@shashamnk2525 9 жыл бұрын
This is great! thanks from India paul
@TurskoVideos
@TurskoVideos 7 жыл бұрын
Wow makes so much sense now. Thank you!
@Moonz97
@Moonz97 9 жыл бұрын
Really helpful, thanks!
@ouadieelouardy1171
@ouadieelouardy1171 9 ай бұрын
From ALX AFRICA Nice Explanation!
@default-126
@default-126 5 жыл бұрын
You are just amazing bro, thank you so much, you helped me a lot!
@chikir9777
@chikir9777 Жыл бұрын
Thanks works fine. Greetings from Italy
@godsugodsu4719
@godsugodsu4719 3 жыл бұрын
Bro holy shit. I misunderstood arg c and argv when i first heard it. But god damn now i finally know how to use it. Thank you so much
@Elliandr
@Elliandr 6 жыл бұрын
You explained this way better than my teacher.
@alehunter15
@alehunter15 5 жыл бұрын
excellent examples and explanations cheers!
@cruisetvshow
@cruisetvshow Жыл бұрын
good explanation. well understood. thanks man
@yann8442
@yann8442 4 жыл бұрын
You are better at explaining than my actual teachers. +1 sub
@untipoacaso5763
@untipoacaso5763 Жыл бұрын
maybe you mean sub++ ( I know, I'm not funny)
@meminhofuny
@meminhofuny 9 ай бұрын
Thanks for the explanation, God bless you!!!
@bluegiant13
@bluegiant13 5 жыл бұрын
Thanks for the explanation I get it, but why is it required? What happens in the background process?
3 жыл бұрын
Great explanation, most of the university professors can't explain this.
@dav8485
@dav8485 5 жыл бұрын
Great explanation, Thank you so much!
@facebook219
@facebook219 Жыл бұрын
thanks a lot!!! so nice reverb
@BittiKit
@BittiKit 6 жыл бұрын
Thank you so much! Very clear explanation.
@GodOfLemon
@GodOfLemon 7 жыл бұрын
My friend, in C you can declare "int i=0" in the for loop. Wish you the best!
@ledues3336
@ledues3336 7 жыл бұрын
Alexandru Dinu yes, but that variable would be deleted as soon as the for loop finishes!
@upcom1ng116
@upcom1ng116 3 жыл бұрын
@@ledues3336 Can you please explain a bit more? or point to the right source? Because CS50 does the same as Alexandru mention above.
@marcelbarbosa281
@marcelbarbosa281 3 жыл бұрын
​@@ledues3336 Yes, this is the intent.
@TheMrMalony
@TheMrMalony 7 жыл бұрын
This was very helpful, thanks!
@adamodimattia
@adamodimattia 4 жыл бұрын
Mindblowing! First I wondered what it was in Java, then in C# and now I finally got the answer in C++ :)
@frogsam4228
@frogsam4228 2 жыл бұрын
it's actually C
@adamodimattia
@adamodimattia 2 жыл бұрын
@@frogsam4228 it's identical in this case
@frogsam4228
@frogsam4228 2 жыл бұрын
@@adamodimattia Idk tbh bcz I know nothing about c++ but I'm sure that the format of main itself is different also the standard library is iostream right? so I guess they can't be identical right
@adamodimattia
@adamodimattia 2 жыл бұрын
@@frogsam4228 it is, but also in C++ you can use everyting what is in C, all the C libs too
@frogsam4228
@frogsam4228 2 жыл бұрын
@@adamodimattia ooh I didn't know that thanks a lot
@tassneemaltaf2001
@tassneemaltaf2001 3 ай бұрын
Thank you so much for the help!
@andrasimion6731
@andrasimion6731 5 жыл бұрын
best video explaining this! thank you
@samdavepollard
@samdavepollard 3 жыл бұрын
good one i can put scanf back on the shelf and just pass values in when i run stuff many thanks for sharing your knowledge subbed
@youzhen11
@youzhen11 6 жыл бұрын
fantastic explanation!
@hindloumari9884
@hindloumari9884 5 жыл бұрын
Thank you so much for this video ! it really helped me !
@mahfuzuddin4545
@mahfuzuddin4545 4 жыл бұрын
great explanation!
@piotrwolak8489
@piotrwolak8489 6 жыл бұрын
really helpful, although the if loop seems unnecessary. If the argc
@wulfriclee1983
@wulfriclee1983 5 жыл бұрын
Great explanation, thanks.
@yevgeniysimonov5906
@yevgeniysimonov5906 4 жыл бұрын
Great, thanks for the explanation!
@volkerking5932
@volkerking5932 3 жыл бұрын
I'm new in porgramming and this video show me for what is this argc and argv. But for what need argc to count his own call from the elter process?
@louisdasselaar7806
@louisdasselaar7806 2 жыл бұрын
Very good explenation!
@praveen1160
@praveen1160 5 жыл бұрын
great explanation understood in one go...
@0xkey434
@0xkey434 6 жыл бұрын
Great tutorial!
@raiyan22
@raiyan22 3 жыл бұрын
Thank you very much! This is well explained! :)
@adetolasanni2
@adetolasanni2 Жыл бұрын
Thank you. Pretty decent explanation.
@TheRealHeroDude
@TheRealHeroDude 6 жыл бұрын
Thank you this helped me a lot!
@SkySentry7
@SkySentry7 2 жыл бұрын
BRAVO! Thanks so much sir.
@RyanLasek
@RyanLasek 3 жыл бұрын
Thank you. Your teaching had a very clear progression from basic code to more complex code.
@frankkkmate4267
@frankkkmate4267 3 жыл бұрын
Thanks so much dude,it really helps me in terms of my final...
@richardifeanyicaleb9653
@richardifeanyicaleb9653 Жыл бұрын
Bro, thanks for details explanation.
@maormoyal10
@maormoyal10 4 жыл бұрын
Great explanation, thx!
@aurianevez2624
@aurianevez2624 4 жыл бұрын
Thanks super clear explanation !
@RajatAggarwal-rl1fz
@RajatAggarwal-rl1fz 2 ай бұрын
This was awesome!
@7Mango033
@7Mango033 8 жыл бұрын
very very good video helped a lot thanks dude :)
@agdimitrova
@agdimitrova 2 жыл бұрын
Real savior!!!! Thank you!!!!
@abbassajjadian698
@abbassajjadian698 7 жыл бұрын
Wonderful explanation! Thanks.
@mrenmajozi2617
@mrenmajozi2617 6 жыл бұрын
I have only seen The way I understand it - int main(int argc, char* argv[]) is like saying data_type array_name[] -int main(int argc, char* argv) This one takes a string called argv instead of an array. Since string is declared as char* string - int main( int argc, char **argv) uses a pointer concept Check this www.programiz.com/c-programming/c-pointers
@benkelcoder5947
@benkelcoder5947 5 жыл бұрын
Thank you, from Turkey.
@menachemlevi
@menachemlevi Ай бұрын
great explanation
@beastlybob572
@beastlybob572 6 жыл бұрын
I finally get it! Thanks!
@Recordingization
@Recordingization Жыл бұрын
Thanks for your video.May I know if I use c++,could I use string[] instead.of char* []?
@canerdogan9916
@canerdogan9916 3 жыл бұрын
perfect video which helped me a lot
@deepakkumars8139
@deepakkumars8139 3 жыл бұрын
Well and clear explanationn...
@washingtonlgois
@washingtonlgois 2 жыл бұрын
Subscribed! Thank you! :D
@mattm32
@mattm32 3 жыл бұрын
Thanks it is very well explained
The Worlds Most Powerfull Batteries !
00:48
Woody & Kleiny
Рет қаралды 18 МЛН
1❤️
00:20
すしらーめん《りく》
Рет қаралды 33 МЛН
What are variadic functions (va_list) in C?
13:49
CodeVault
Рет қаралды 19 М.
but what is 'a lifetime?
12:20
leddoo
Рет қаралды 57 М.
What are command line arguments (argc and argv)?
11:38
CodeVault
Рет қаралды 112 М.
Be Careful When Using scanf() in C
12:22
NeuralNine
Рет қаралды 126 М.
Comparing C to machine language
10:02
Ben Eater
Рет қаралды 5 МЛН
why do header files even exist?
10:53
Low Level Learning
Рет қаралды 350 М.
"C" Programming Language: Brian Kernighan - Computerphile
8:26
Computerphile
Рет қаралды 1,8 МЛН