A supercharged introduction to the C programming language. Dave teaches you a cocktail-party level of C in under one minute.
Пікірлер: 300
@guydror7297 Жыл бұрын
He says C but displays the C++ icon
@paulveitch Жыл бұрын
And yet he's only used C in the examples
@rm_steele Жыл бұрын
@@paulveitchand the autocomplete shown in the video is giving c++ code
@CuriouslyWatching Жыл бұрын
He created Task Manager. He can display Python or JavaScript for all I care. He's earned it
@lyricaluchiha2978 Жыл бұрын
Already a reason to skip
@rodrigosouto9502 Жыл бұрын
Easter Egg bro
@lefteriseleftheriades7381 Жыл бұрын
I now know enough C to write my own operating system. Just need a 60 second assembly course so I can switch from real to extended mode and create the TLB
@edoyak122466 Жыл бұрын
Lol
@javabeanz8549 Жыл бұрын
Been a lot of years ago, but I wrote a bit of 8086/8088 ASM. In my course on Digital Computer Electronics, we did a few projects, the final project being a stop watch on an 8086 trainer. Outside of the class, I coded most of an ASM program to read a clock chip on a Leading Edge computer, and set the time in MSDOS 3.2. Funny thing though, they made enough changes in 3.3 that it didn't work. So I gave my classmate a copy of the code my instructor and I wrote. I don't know if they ever got it working on 3.3.
@vieilatome2257 Жыл бұрын
I've been there, and my solution was to steal some assembly code from random osdev projects :') You need to do interrupt table and shit, but at least you will get access to the keyboard, so hooray !
@azhagurajaallinall126 Жыл бұрын
Huh.. you can write your OS in C? I mean the usable,not just boot with command line interface There's one of the Projects Mr.Dennis Ritchie himself head on development like Plan9,Inferno OS,Limbo (programming language) which are available in opensource Dennis Rotchie lead it as original intended way of creating C:portability,sharing with peers Until Java stole it with "write once,run anywhere" marketing catchphrase with chip industry growing & no cooperative plan to make ports for common purpose (thus leads to ever spewing "backward compatibility" curse that haunt the whole computer science industry) Some easy examples are Python,Java with their new versions simply outdating their own past versions (and they force it by stopped "support",No community or people be care like that) So back to the original convo,how could you (would you ever before actually?) Write OS without using Assembly & how 😳 Please share more info,you could check my channel too 😊 As sharing is what makes computer science one if the good communities leading the world 😅❤🌏🎉 Wish all be well 😃🌟✨🙌 25.07.2023 06:00/01 pm ist 4rea,25 like,1Ma
@chefboyardeeznutsinyourmouth Жыл бұрын
Okay Terry Davis the second
@deadseveredheads Жыл бұрын
Thought I was about to get a music theory lesson. I hid my guitar…
@fabiandrinksmilk62059 ай бұрын
Next step will be C# then
@getdirtyonthedancefloor8 ай бұрын
music theory is pog
@greg4367 Жыл бұрын
As a fifty-year C programmer... just one question: Why did you take so long, it's Not that complicated? Love your stuff.
@____________________________a Жыл бұрын
this is for the average smart person who has basically 0 experience with the concept of programming, so some context of how programs work and some general programming theory would probably be necessary for comprehension
@officialbfi01 Жыл бұрын
Assuming you really have been programming with C since it’s creation in the early ‘70s, you have decades of experience with the language so clearly you’re not the target audience for the video. For anyone who hasn’t seen C code (or any code) before, this is a concise and thorough explanation of the very basics that other KZbin videos would spend 10 minutes describing yet here is done in under a minute. I would like to say though that if you actually have been programming for 50 years that is pretty cool 👌
@SnarkDADmin Жыл бұрын
I think both of the other replies are missing the sarcasm in this comment.
@seg_fault_jim Жыл бұрын
@@officialbfi01 will see niuuthe
@gklinger Жыл бұрын
Now explain to the newbs that puts() is for strings but if they want to print a variable they have to use printf(). I've been asked about that a few times over the years.
@informativt Жыл бұрын
the f means format. they do different things.
@seremptos Жыл бұрын
So you mean that puts is useless, because printf can do exactly the same thing, but even more
@mgord9518 Жыл бұрын
@@seremptos It's not useless because it's faster and also automatically adds newlines. In situations where you're not using any variables, it makes little sense to use printf. Although, every modern compiler I can think of will automatically convert simple printf statements into puts.
@seremptos Жыл бұрын
@@mgord9518 oh yeah makes sense but like in school we only learn about the printf
@informativt Жыл бұрын
@@mgord9518 It's not useless, as it is predictable. Eg if you feed it something that looks like a format string it will behave as expected.
@KindStarWonder Жыл бұрын
But Dave... you said nothing about pointers or dynamically allocated memory.
@afourtrackmind8 ай бұрын
I’m coming at this without having much in way of computer education except from what I’ve picked up over the years. I’d really like to improve to the point where I can do more making my own shit. Unlike most of the comments, my dumb ass found this useful. Thanks.
@davidclift5989 Жыл бұрын
At college, my computer science teacher gave computers the acronym TOM CAT (Total Obedient Moron Can't Actually Think). It's worth remembering, even for that fancy AI stuff people keep going on about, it really is not thinking!
@malekith6522 Жыл бұрын
Oh my oh my ... Words of gold.
@pavliv3 ай бұрын
Okay i need to update my resume, now i know C.
@Silentbob14942 ай бұрын
'smart person'? HAHA! Sir, you got me fuuucked up.
@TN-cx4qi Жыл бұрын
Yep this covers everything. If you watch this start applying for as many software engineering jobs as you can.
@Saberkun_KM10 ай бұрын
Thank you, dad 🥺
@whatamidoingwithmylife8675Ай бұрын
I relate to C. I don't think, I don't know anything, I'm just able to perform simple steps.
@WifeWantsAWizard Жыл бұрын
Does it every say, "No, YOU puts!!!"
@mr.shredder543010 ай бұрын
c progamming means cipicial
@patrickohara2276 ай бұрын
Awesome!
@hussienkhaled19187 ай бұрын
What do you mean by 30 words ?
@YouTube.....1M4 ай бұрын
Now I can put it in my Resume😂
@tim_allen_jr10 ай бұрын
C++ can handle most tasks for you if the hardware can follow the program.
@denizdgtn41087 ай бұрын
I learned ty
@vivekk808310 ай бұрын
Why void function???
@sanjarcode Жыл бұрын
Thanks for this
@brad9529 Жыл бұрын
30 words that can be used in endless complicated web
@thecameraman7682 Жыл бұрын
Which compiler do you use??
@adoolaTurayk5 ай бұрын
Is bro using visual studio ⁉️⁉️🤨👊
@matthewspence74768 ай бұрын
Average smart person? Well, I am the average dumb person but I will try to learn anyway
@gxy_senpaii6 ай бұрын
Thanks. Now i can go to alien spaceship and hack the system
@Swatto Жыл бұрын
@Dave What do you determine as a smart person?
@BrianC1664 Жыл бұрын
Someone that doesn't have an opinion regarding which crayons taste the best?
@quetzalcoatl-pl Жыл бұрын
Not watching this movie.
@Mintteacup_ Жыл бұрын
@@quetzalcoatl-pl not a movie
@demonkingrimuru7844 Жыл бұрын
He explained 1st 2 chaps main points of engineering 1st yr in 60 sec 😂😂
@The-python-guy3 ай бұрын
Thanks for giving me task manager, so I can see how poorly optimized my code is in memory
@The-python-guy3 ай бұрын
Oh and fix it with the data in mine
@berighteous Жыл бұрын
Why is there a Void there? "Void" in english means an empty space. It's means nothing. If you say void then anything after it means nothing.
@DavesGarage Жыл бұрын
And that pointer points to nothing yet, just the address. It won't be a "thing" until cast to another type.
@givowo Жыл бұрын
i thought it meant something that you put something into but get nothing out. since you would replace void with the return type (meaning something will be returned) it means that void wont return anything, so if a void has parameters you will give it data but not get any out (directly, since ofc you do stuff in a function)
@TheFeralEngineer Жыл бұрын
Void functions don't have to return a value
@parmodparkash15422 ай бұрын
Ch , me Hmm . Good
@chalupagrande8544 Жыл бұрын
Yeah…but what about pointers 😂
@DavesGarage Жыл бұрын
Just made a whole video on pointers, be sure to check it out on the channel!
@reynoldskynaston9529 Жыл бұрын
I’m pointing at you 🫵
@chalupagrande8544 Жыл бұрын
@@reynoldskynaston9529 😂
@larrybird3729 Жыл бұрын
puts?? wow! I had no idea! I thought is was only this -> std::cout
@wildca1x1 Жыл бұрын
std::cout is c++ which does something similar. std::cout prints characters to the standard output. A close equivalent to c would be write(1, what, size), since write(1 sends to standard output too.
@larrybird3729 Жыл бұрын
@@wildca1x1 cheers, amazing info
@mgames3209 Жыл бұрын
printf is better than puts imo
@diegomarquez32936 ай бұрын
Really?
@DavidJJJ Жыл бұрын
Now do python without saying the words space or tab…
@thrice5560 Жыл бұрын
What the fuck is puts lol.
@madmax404 Жыл бұрын
IT PUTS THE LOTION IN THE BASKET
@johnlauro1395 Жыл бұрын
man 3 puts tl;dr: Prints a string and a trailing newline to stdout.
@Flo_Resolution Жыл бұрын
@@johnlauro1395 Just like print() in JS or System.out.println() in Java
@unknownguywholovespizza Жыл бұрын
@@Flo_Resolutionyou mean console.log in JS
@Flo_Resolution Жыл бұрын
@@unknownguywholovespizza your right, mb
@oneilfamily6812 ай бұрын
L
@mmhck Жыл бұрын
Thanks. I can now finish my nuclear reactor’s cooling system.
@AbuGoldstein Жыл бұрын
😁😁
@lret2070 Жыл бұрын
Writing something so sensitive in c sounds like an accident waiting to happen.
@der.Schtefan10 ай бұрын
I would argue copilot would have been able to help too.
@smallSphere6910 ай бұрын
@@lret2070 you can't write that much complex systems with higher language btw. I prefer Assembly
@lret207010 ай бұрын
@@smallSphere69 Braindead comment, Linux kernal is written in c as a re microsoft and apple operating systems. Is that not complex?
@NexusKiwi4 ай бұрын
Text: C in 60 seconds Logo: *shows c++*
@Exedeble3 ай бұрын
Showing C with puts instead of printf is madness
@lucasgroves137 Жыл бұрын
"Watch it again until it makes sense..." 😄
@RonakKumar-w6w10 ай бұрын
Congrats 🎉🎉🎉 everyone. We learned c in just 60 sec.. 😂😂😂😂😂
@Bill_N_ATX Жыл бұрын
This is like saying writing a great novel in English is easy. After all it only uses 26 characters to capture every word in the language. Just 26 characters.
@rya31909 ай бұрын
Well, if english was a simpler language, it would be relatively easy, but it's 4/5 languages in a trenchcoat, and many don't stem off each other...
@omara50795 ай бұрын
Languages are simple, programming is not
@NotEight4 ай бұрын
@@omara5079Ive been practicing C and its actually pretty simple, sure its not as simple as lua or python but its still mostly readable...
@omara50794 ай бұрын
@@NotEight that’s not a contrary statement to mine. Most programming languages are simple and have an easy to follow syntax. Programming is more about the problem you are trying to solve, not so much the language you write it in. Like you could write a compiler in many languages that are simple to read, but it is a complex problem. Or, a middle schooler can read, but could they comprehend an essay about theoretical physics? They can read the words probably, but the ideas wouldn’t sink in. It’s great that you’re learning more and more, keep going and keep building
@NotEight4 ай бұрын
@@omara5079 thanks for clearing that up, i understood your comment wrong, and also thanks for not getting mad like most people would
@Archedbog915 ай бұрын
Why doesnt the hello world funtion not return 0? Or better yet, why is main a void finction instead of an int function?
@cirkulxАй бұрын
c99 was the first to invalidate main being declared as void and not int, i imagine thats instinct
Жыл бұрын
It's also a `What is a programming language` instead of `Learn C`.
@oj2142 ай бұрын
Ikr lol
@sharokhkeshawarz21229 ай бұрын
Did he just made a function main with void ? XD (it works but dangs its not usual)
@Egilhelmson6 ай бұрын
Alas, by the standard, main() returns an int value, not void. Ignoring the return value by using the void type is easy, but wrong, like assuming your micro-C will free() dynamic memory from alloc().
@TRDiscordian Жыл бұрын
Why is the opening logo C++ if you're explaining C?
@TRDiscordian Жыл бұрын
This is such a pointless video, but hopefully it was fun to make.
@kevinyonan9666 Жыл бұрын
Because Dave is a boomer who prob thinks C and C++ are still the same language despite them separating since the 90s
@john.dough. Жыл бұрын
@@kevinyonan9666 it's because github copilot automatically filled it in, and large language models are inherently unreliable, especially with minimal context 🤦 he literally didn't write it, and you're ironically exposing how out of touch you are with modern AI developer tooling.
@kevinyonan9666 Жыл бұрын
@@john.dough. I'm strongly aware of the AI aspect and we're not talking about that. Go be a troll somewhere else
@reynoldskynaston9529 Жыл бұрын
@@kevinyonan9666 c++ is just c with more stuff (kinda)
@damionlee7658 Жыл бұрын
It doesn't think, it doesn't know anything, it doesn't get happy, it doesn't get sad... It just runs programs!
@erikkonstas8 ай бұрын
Also, (void ()()) is not a valid type for main, the valid ones are (int ()(void)) and (int ()(int, char**)).
@CloudKing0077 ай бұрын
Bro what is the name of the compiler used in the video
@erikkonstas7 ай бұрын
@@CloudKing007 Hm, IDK, but I've since unsubbed from this channel, too many erroneous videos in there.
@cirkulxАй бұрын
only in c99+
@erikkonstasАй бұрын
@@cirkulx Can we please not defend this dude??? First, C99 should be the lowest version of C one should be using nowadays, second this is a glaring mistake that screams how untrustable he is! Oh and, third, his content has never impressed me in any way, shape or form, nor has his claim of "I made the first Task Manager woo"...
@cirkulxАй бұрын
@@erikkonstas I said only in C99+. So maybe stop overreacting that I'm defending the guy, because I know the stuff he did, changed or not. You didn't have to spring into overreaction because I clarified that he's probably used to older than C99. As someone who has written a C program I do set it to c2x as a flag now, because writing C89 is pretty stupid.
@madmax404 Жыл бұрын
FYI Having the wrong logo and having that autocomplete (copilot?) turned on in this example makes this a lot less beginner-friendly. (Because it's confusing and gaslighty)
@LoveToMix Жыл бұрын
“Average smart person” love that description
@raceboi15 ай бұрын
"Can I explain C..." Nah man you don't even have the right syntax when even writing the basic "Hello World" XD!
@JustinEmlay Жыл бұрын
To the average smart person. Now that's qualification!
@Petch85 Жыл бұрын
30 words... Sounds like an over-simplification to me.
@JorijnLamberink Жыл бұрын
it really does not take much more than that ;)
@perwestermark8920 Жыл бұрын
Not sure if it has changed but last I checked, C has 32 reserved keywords. auto break case char const continue default do double else enum extern float for goto if int long register return short signed sizeof static struct switch typedef union unsigned void volatile while
@valcubeto9 ай бұрын
"If the function doesn't exist, you need to define it" "Don't forget to clean your allocated values at the end"
@thegreatchaos132 ай бұрын
HOW DOES THE MAIN FUNCTION HAVE A VOID RETURN TYPE THAT IS ILLEGAL
@LogoSystemCG Жыл бұрын
the basic BS you showed introduction to programing lol, if you don't speak about pointers you don't speak about C my friend.
@Duckless1372 ай бұрын
I’m sorry VOID main? You’re insane…
@pakutamiko820710 ай бұрын
How to code in pure C on windows with a Lightweight editor
@jal0518 ай бұрын
Visual Code with the C extension. It's free and a great editor.
@candyts-sj7zh Жыл бұрын
I am the average stupid person
@Bassotronics Жыл бұрын
I want to learn C - + for quantum computers.
@futuristic- Жыл бұрын
Sorry I could only teach you C**
@gamingbutimbad1943 Жыл бұрын
I know it's a joke but if you're curious about how quantum computers are programmed then check out Q# by Microsoft
@ajk_ Жыл бұрын
Thanks for making shorts for good and not for evil
@pyromethious Жыл бұрын
What's the auto-complete being used?
@drewf64 Жыл бұрын
I feel ready to write an optimal prime sieve
@teckyify8 ай бұрын
Std::println
@HyperKNF2 ай бұрын
32 deg fahrenheit 💀
@m9ddie6 ай бұрын
now tell me how tf i was supposed to figure out that exercise
@asailijhijr Жыл бұрын
You're explaining programming, not teaching c, let alone c++.
@denizsincar29Күн бұрын
Wait, how does C handle dangling references, null pointers and double deallocation? Doesn't it?
@der.Schtefan10 ай бұрын
You can explain it to the average person, but you can't make them write code that is correct and won't mess up things. Nobody can...... Nobody.
@ogamiitto5642 Жыл бұрын
Just 2 small… well, maybe not mistakes, letʼs call them blemishes: As specified, both CheckTheWater() as well as main() will⁽¹⁾-‘void’ being missing-be recognized as variable argument functions (i.e. functions that can be called with any number of arguments [of any type]). Also ‘void main()’ should, if one wants to be standards-compatible, probably be typed as ‘int main(void)’… so that the application at hand can properly return its exit status code. Other than those small nitpicks: For 60 seconds? Nice video! ⁽¹⁾ At least until C23 is in wide use.
@hindikamapangit8 ай бұрын
Ç
@susamogus111117 ай бұрын
Curly braces after the line Pain for most programmers
@lordofdrones Жыл бұрын
>no seg faults Hah, that ain't C.
@adamscarsandstuff49696 ай бұрын
The letter “C” holds a distinctive place in the English alphabet, often recognized for its versatility and varied pronunciation. Its phonetic range allows it to represent different sounds, including the hard “k” sound as in “cat” or the soft “s” sound as in “cent.” This duality contributes to its widespread use in constructing words across various contexts, making it an essential component of language. In linguistics, “C” also plays a crucial role in understanding phonology and phonetics. It is classified as a consonant, which means it typically requires some obstruction of airflow to produce its sound. However, its flexibility extends beyond this traditional classification, as evidenced by its ability to mimic both consonantal and vowel-like qualities depending on its placement within a word. Beyond its phonetic significance, “C” holds cultural and historical significance. It has been part of numerous ancient scripts, evolving over time to its current form in the Latin alphabet. Throughout history, the letter “C” has been associated with various symbols and concepts, often representing notions like creation, continuity, or change in different cultures and mythologies. Moreover, “C” serves as a cornerstone in modern communication, appearing prominently in various fields such as literature, science, and technology. From composing compelling narratives to formulating complex mathematical equations, its presence is ubiquitous. Whether it’s in crafting elegant prose, deciphering scientific formulas, or navigating digital interfaces, the letter “C” remains an indispensable element of human expression and understanding. And yes this was ai generated
@ingenierocristian2 ай бұрын
I need ten years to understand C/C++...
@LogicStudios_1Ай бұрын
Thought I was gonna learn how C worked, but instead I learnt how basic programming works. 😔
@derciferreira252313 күн бұрын
I dont learn computer language which contains the word void.
@vasekharangАй бұрын
Instructions unclear, my program eats 200MB RAM more every 5 seconds
@Raphaeltheslayer3 ай бұрын
It looks similar to Lua, I have a feeling I’d be able to navigate it earlier with the similarities it has just different wording and some scripts like module scripts require that same syntax so it isn’t a complete new thing
@----.__ Жыл бұрын
SYS 64738
@tyronewalker576414 сағат бұрын
I can't get those brackets right!
@starpawsy2 ай бұрын
puts () does not output a trailing newline char. You need to explicitly include that at the end : "hello world "
@cosimogaleotti229527 күн бұрын
Sorry but i'm new wat thipe of variable is void?
@bradleyr445111 ай бұрын
Id say your C explanation deserves an F. How many newbies understood what C or C++ is after that?
@thegreatpleco39207 ай бұрын
Uh main should return an int and at least i like to use it woth argc and argv
@MadOgre228 ай бұрын
What the hell is puts?? Is this ruby? If this was C it would be printf, if C++ - cout.
@vistaero Жыл бұрын
C and C++ are not the same thing. You know that for sure. Why would you mix them up?
@IshayuG Жыл бұрын
He didn't, it was autotype prediction. It was not ideal.
@von_nobody Жыл бұрын
@@IshayuG In recent video he mix it too, he explain pure C concepts and used C++ library, not meeting using C++ logo on both this video.
@javabeanz8549 Жыл бұрын
Considering that I took what was supposed to be a C++ college course years ago, and all we wrote was C, but we interacted with some C++ code that the instructor gave us for one project near the end of the course. I also was active in a news group where the people that wrote C++ were regularly active, so the course was a bit confusing, when reading about how C++ should be coded.
@e.lan.s Жыл бұрын
Watch again until it makes sense
@fruitfcker5351 Жыл бұрын
Not enough time. Maybe you should stretch it to 100 seconds.
@orozco13025 ай бұрын
Average smart person. I guess this video isnt for me
@Anemoboy224 ай бұрын
c......++?
@multiamphetaminsaft8 ай бұрын
C is simple, but it does not deserve a 60 sec short …