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.
@@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
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
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.
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 !
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
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.
@@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.
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
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 CZcams 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 👌
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().
Před rokem+23
It's also a `What is a programming language` instead of `Learn C`.
@@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.
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)
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
What always got me in multiple languages (until later) was - why “void”, or why “public static void main()” (Java) etc ? I just didn’t understand that void (or int or whatever) was the return type. To many, I was overthinking it while at the hello world stage, but I really think that understanding each part helped me reduce any fear / anxiety I had about individual languages or systems. When a language just does “print” it seems so much more accessible to a newbie than “public static void main”. But I got there… I love your channel, keep up the great work!!
@@erikkonstas The exit code of a Java application is not directly related to the return type of the main method. Instead, the exit code is determined by the status of the application upon termination. By default, if the application exits normally, it returns an exit code of 0. If there are any uncaught exceptions leading to abnormal termination, a non-zero exit code is returned. If you want to explicitly set an exit code, you can use the `System.exit(int statusCode)` method. For example, `System.exit(0)` indicates successful completion, and any non-zero value can indicate various error conditions. So, you don't need to change the main method to `public static int main`. The standard `void` return type is appropriate, and you can manage exit codes through `System.exit(int)` as needed.
I realised just now though you’re probably talking about C. I haven’t worked much with C tbh. And my reply mentioned “multiple languages”. I’m more familiar with Java. Sorry
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
ISO C99 and later do not support implicit function declarations and main should have a return type of int and specifying it as void may give you warnings or even compiler or linker errors (depending on the compiler)
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!
From absolutely 0 knowledge about programming, I learned to program by looking at 2 short episodes of 10 from of a youtube tutorial about C programming around 10 years ago.
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.
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.
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.
Dave, I have a question. Why does windows X,Y values start in the top left instead of the bottom left of the hypothetical window graph like in classical mathematical notation?
I dunno but it's probably the fact that most 2D rendering stuff does that An actual reason could be because a rectangle is position and size and it renders starting at the topleft and ending at the position+size (i dunno probably not)
I may be wrong but it could be a sort of convention that was applied to crt monitors. As you may know this older system consists in a beam of electrons that travels from the first row to the last. The first point is in the top left and the last point is in the bottom right.
@@gabriel55ita And this is the correct reason. CRT was the main output for a long time. And it traditionally emits the image in the same order we read text in the western world. And most (not all) programming languages with graphics have the graphics arranged based on the memory order the data is output. But it's also the same when selecting row/column to output text.
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
... and now: passing pointers, values, and (de)references via function return types and type casting - but not before choosing malloc() vs alloc() ... 😶
@@erikkonstas it's another dynamic mem allocation function; not part of ansi c standard library. Some definitions do float around. I recall, some many years ago, confusing an include for alloc.h with other library's alloc() funtion and ended up including a 3rd party lib to get an alloc() - which seemed like it met the vauguly-explained assignment .... my original comment was intended to joke that 60 seconds covers neither the nuances of complexity, nor the scope of meaningfully leveraging the C language ... does that help you?
He says C but displays the C++ icon
And yet he's only used C in the examples
@@paulveitchand the autocomplete shown in the video is giving c++ code
He created Task Manager. He can display Python or JavaScript for all I care. He's earned it
Already a reason to skip
Easter Egg bro
Thanks. I can now finish my nuclear reactor’s cooling system.
😁😁
Writing something so sensitive in c sounds like an accident waiting to happen.
I would argue copilot would have been able to help too.
@@lret2070 you can't write that much complex systems with higher language btw.
I prefer Assembly
@@smallSphere69 Braindead comment, Linux kernal is written in c as a re microsoft and apple operating systems. Is that not complex?
"Watch it again until it makes sense..." 😄
Congrats 🎉🎉🎉 everyone.
We learned c in just 60 sec.. 😂😂😂😂😂
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.
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...
Languages are simple, programming is not
@@omara5079Ive been practicing C and its actually pretty simple, sure its not as simple as lua or python but its still mostly readable...
@@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
@@omara5079 thanks for clearing that up, i understood your comment wrong, and also thanks for not getting mad like most people would
Thought I was about to get a music theory lesson. I hid my guitar…
Next step will be C# then
music theory is pog
Text: C in 60 seconds
Logo: *shows c++*
Showing C with puts instead of printf is madness
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
Lol
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.
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 !
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
Okay Terry Davis the second
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.
the f means format. they do different things.
So you mean that puts is useless, because printf can do exactly the same thing, but even more
@@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.
@@mgord9518 oh yeah makes sense but like in school we only learn about the printf
@@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.
Why doesnt the hello world funtion not return 0?
Or better yet, why is main a void finction instead of an int function?
But Dave... you said nothing about pointers or dynamically allocated memory.
Did he just made a function main with void ? XD (it works but dangs its not usual)
As a fifty-year C programmer... just one question: Why did you take so long, it's Not that complicated? Love your stuff.
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
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 CZcams 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 👌
I think both of the other replies are missing the sarcasm in this comment.
@@officialbfi01 will see niuuthe
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().
It's also a `What is a programming language` instead of `Learn C`.
Ikr lol
“Average smart person” love that description
"If the function doesn't exist, you need to define it"
"Don't forget to clean your allocated values at the end"
Why is the opening logo C++ if you're explaining C?
This is such a pointless video, but hopefully it was fun to make.
Because Dave is a boomer who prob thinks C and C++ are still the same language despite them separating since the 90s
@@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.
@@john.dough. I'm strongly aware of the AI aspect and we're not talking about that. Go be a troll somewhere else
@@kevinyonan9666 c++ is just c with more stuff (kinda)
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)
Thanks for making shorts for good and not for evil
Also, (void ()()) is not a valid type for main, the valid ones are (int ()(void)) and (int ()(int, char**)).
Bro what is the name of the compiler used in the video
@@megharajm.h5642 Hm, IDK, but I've since unsubbed from this channel, too many erroneous videos in there.
It doesn't think, it doesn't know anything, it doesn't get happy, it doesn't get sad... It just runs programs!
To the average smart person. Now that's qualification!
I feel ready to write an optimal prime sieve
'smart person'? HAHA! Sir, you got me fuuucked up.
How to code in pure C on windows with a Lightweight editor
Visual Code with the C extension. It's free and a great editor.
What's the auto-complete being used?
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
What always got me in multiple languages (until later) was - why “void”, or why “public static void main()” (Java) etc ? I just didn’t understand that void (or int or whatever) was the return type. To many, I was overthinking it while at the hello world stage, but I really think that understanding each part helped me reduce any fear / anxiety I had about individual languages or systems. When a language just does “print” it seems so much more accessible to a newbie than “public static void main”. But I got there…
I love your channel, keep up the great work!!
What’s wild is I’m understanding what you said quicker than I understood the video
void is also the wrong return type for main, which is supposed to return the exit code, the correct type is int.
@@erikkonstas The exit code of a Java application is not directly related to the return type of the main method. Instead, the exit code is determined by the status of the application upon termination. By default, if the application exits normally, it returns an exit code of 0. If there are any uncaught exceptions leading to abnormal termination, a non-zero exit code is returned.
If you want to explicitly set an exit code, you can use the `System.exit(int statusCode)` method. For example, `System.exit(0)` indicates successful completion, and any non-zero value can indicate various error conditions.
So, you don't need to change the main method to `public static int main`. The standard `void` return type is appropriate, and you can manage exit codes through `System.exit(int)` as needed.
I realised just now though you’re probably talking about C. I haven’t worked much with C tbh. And my reply mentioned “multiple languages”. I’m more familiar with Java. Sorry
Why would you have a void main?
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
Okay i need to update my resume, now i know C.
ISO C99 and later do not support implicit function declarations and main should have a return type of int and specifying it as void may give you warnings or even compiler or linker errors (depending on the compiler)
SUPER THANK YOU
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!
Oh my oh my ... Words of gold.
"Can I explain C..." Nah man you don't even have the right syntax when even writing the basic "Hello World" XD!
Awesome!
Thank you, dad 🥺
Now I can put it in my Resume😂
Starring Vin Diesel and Nicolas Cage
Great job 😊
Thanks for teaching me c.
Thanks for this
I learned ty
From absolutely 0 knowledge about programming, I learned to program by looking at 2 short episodes of 10 from of a youtube tutorial about C programming around 10 years ago.
Which compiler do you use??
who uses puts() instead of printf() ?
Man explaining C with C++ syntax
The main function MUSTt return int.
what keyboard do you use please tell me
Cool, but i'd recomend printf function wich comes from stdio and including a newline at the end of the string via
And where do you think puts comes from...?
@@erikkonstas stdio
Does it every say, "No, YOU puts!!!"
Thanks to this video I was able to dev a next gen video game.
Curly braces after the line
Pain for most programmers
Why does he use void main instead of into main
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.
c : the DSL for memory management errors
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.
Nice
C and C++ are not the same thing. You know that for sure. Why would you mix them up?
He didn't, it was autotype prediction. It was not ideal.
@@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.
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.
Watch again until it makes sense
What do you mean by 30 words ?
Dave, I have a question. Why does windows X,Y values start in the top left instead of the bottom left of the hypothetical window graph like in classical mathematical notation?
I dunno but it's probably the fact that most 2D rendering stuff does that
An actual reason could be because a rectangle is position and size and it renders starting at the topleft and ending at the position+size (i dunno probably not)
I may be wrong but it could be a sort of convention that was applied to crt monitors. As you may know this older system consists in a beam of electrons that travels from the first row to the last. The first point is in the top left and the last point is in the bottom right.
@@gabriel55ita that makes perfect sense
@@gabriel55ita And this is the correct reason. CRT was the main output for a long time. And it traditionally emits the image in the same order we read text in the western world.
And most (not all) programming languages with graphics have the graphics arranged based on the memory order the data is output.
But it's also the same when selecting row/column to output text.
Uh main should return an int and at least i like to use it woth argc and argv
now tell me how tf i was supposed to figure out that exercise
Why void function???
What kind of app is that?
Yep this covers everything. If you watch this start applying for as many software engineering jobs as you can.
I’m sorry VOID main?
You’re insane…
I want to learn C - + for quantum computers.
Sorry I could only teach you C**
I know it's a joke but if you're curious about how quantum computers are programmed then check out Q# by Microsoft
30 words that can be used in endless complicated web
C++ can handle most tasks for you if the hardware can follow the program.
Now people can add c programming in their resume 😅
Std::println
Thanks for giving me task manager, so I can see how poorly optimized my code is in memory
Oh and fix it with the data in mine
A bit simplified but good video!
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.
PascalCase?? Why??
I am the average stupid person
30 words... Sounds like an over-simplification to me.
it really does not take much more than that ;)
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
c progamming means cipicial
@Dave What do you determine as a smart person?
Someone that doesn't have an opinion regarding which crayons taste the best?
Not watching this movie.
@@quetzalcoatl-pl not a movie
See, even he uses copilot
When you want to teach somebody a language?
Zig
C is simple, but it does not deserve a 60 sec short …
Bro... Put int main not void main
Average smart person? Well, I am the average dumb person but I will try to learn anyway
Is bro using visual studio ⁉️⁉️🤨👊
... and now: passing pointers, values, and (de)references via function return types and type casting - but not before choosing malloc() vs alloc() ... 😶
Where is "alloc" a thing? 😂
@@erikkonstas oh, you don't use C libraries at all?
@@lazertroll702 I'm not aware of any libc with an "alloc" function...
@@erikkonstas it's another dynamic mem allocation function; not part of ansi c standard library. Some definitions do float around.
I recall, some many years ago, confusing an include for alloc.h with other library's alloc() funtion and ended up including a 3rd party lib to get an alloc() - which seemed like it met the vauguly-explained assignment ....
my original comment was intended to joke that 60 seconds covers neither the nuances of complexity, nor the scope of meaningfully leveraging the C language ... does that help you?
SYS 64738
No Duff's device. Instant fail.
So this with pointers… *🙏
He explained 1st 2 chaps main points of engineering 1st yr in 60 sec 😂😂
Ha! Now do hello world like it was for windows 3.12
Average C code used by Pindows
c......++?
32 deg fahrenheit 💀
Where to learn pure C
Can someone explain the well joke to me pls 😊
What is that void?
A mistake.
Hmm only 30 words nice info for beginner
My laptop takes almost 10 minutes to open till than someone can learn c 20 times 😢