Excellent series of over a hundred short videos (116) about basic computer functions and basic programming. These are the things every programmer should know master master first.
I have finished almost the full playlist "Unix process in c". I think some of the videos on this playlist are not in order. Anyway, your videos are helping me a lot.
Man you deserve even more subscribers and views, the effort you put into your videos is huge, thanks a lot. Also would have a question to you, I have some experience in C, and I really want to go through your tutorials, but I could not figure out what the real order of the videos are, could you help me out? Thank you best regards.
Thank you! Most videos don't have an orde aside from the linked list, processes and threads courses (which have their own playlist). They are meant as completely standalone videos so people can quickly understand a topic they are stuck on without having to go through hours of courses. But you're right, if you want to learn C from these videos it can be quite confusing... I will look into putting all videos in playlists basic on their topic, is that alright?
informative video, thanks sir! one question you said 1 is four bytes in int which is 0001its four bit right so that means every number has its own four bit i did not quite understand! it is stored in hexadecimal format in the program?
"so that means every number has its own four bit" Now here's where your misunderstanding begins. A number, whether it be in the real world, in programming or in a video game doesn't HAVE bytes. BUT, a variable, the place where we can store numbers in a computer, does have BYTES. An INT usually has 4 bytes and a SHORT INT has 2 bytes. --------------- When I said that the 1 inside an INT is 0 0 0 1, each digit represented a BYTE. In hexadecimal it would be: 00 00 00 01 In binary (the way it is stored in memory) would actually be: 00000000 00000000 00000000 00000001 A 1 inside a SHORT INT i wrote it as 0 1, again, one digit per BYTE. In hexadecimal it would be: 00 01 And in binary: 00000000 00000001 Notice the difference? "it is stored in hexadecimal format in the program?" No, it always goes down to bits. So that was just a simplified notation on my part.
@@CodeVault This is a part I struggled with as well. What I still can't understand is if it always goes down to bits, why didn't metset(arr1, 1,...) produce all bits as 1? Rewatched the video, if I am not wrong, thats due to memset accepting bytes in second parameter and not bits, or better say whatever goes in second parameter is treated as a byte and not bit.
Thank you so much! Excellent series of videos with clear explanations! But, the playlist is not organised. Please, short them. It would be much more clear. Thanks a lot man!
Yeah, sorry about that, that playlist is just a collection of ALL the C videos on the channel (in chronological order). I will create some playlist based on their topic, but the order is still not going to matter as most of them are meant to be standalone.
Hello ! Thank you for this great video. Would it be possible to have more explanation about the memset function ? I understood that we get "16843009" for each number when we print the result of memset as an int (with %d) because the hexadecimal result is "01010101". But as you said "memset will set every single byte to 1", I would expect the result of memset to be something like "00000001". There is probably something I don't understand about memory. I am reading about it, but I am still confused.
Well, an int has 4 bytes. Since memset sets every byte to 1 (in the example in the video) we get: 01010101 Note that this notation is in hexadecimal and each 2 characters represent a single byte. If we were to write it in binary you would get this: 00000001000000010000000100000001
@@CodeVault it makes more sense now 😅 since I am new to this it’s still tricky sometimes ! I’ll read about the use of %x, but can you tell me if it is possible to use printf to print actual binary format ? Thank you a lot ! :)
I just discover your channel and want to watch all your videos on C. My skills in C declined in last years. Is there any order in which you should watch "The C programming language made simple"? I have on first position "Memory manipulation functions in C", definitely not "Hello World!" program. The latter being the most important program in the world!
The videos in that playlist were never made to be watched in any specific order. I did create some more specific playlists in which I added all the relevant videos and I put them in order from least complex to most complex (although, again, they are not perfect) Here you can check them out: ruclips.net/user/CodeVaultplaylists The Linked Lists, Unix Processes and Unix Threads playlists are actually made to be watched in order
Originally in the 1st int, we have a decimal expression of 0003, don't we? I'm a little confused by how it was turned into the hexadecimal expression of 01010101. Conversion looks like these: 0 01, 001, 001, 301. Why?
That's because of how memset works. So, let's take a look at arr1[0]. First we have the element 3, which is in hexadecimal: 00 00 00 03 (each pair for 2 hex digits represent a single byte) Now, after we call memset(arr1[0], 1, 2 * sizeof(int)); memset will change each BYTE to have the value 1, so since arr1[0] is an int that has 4 bytes we will get this value in arr1[0]: 01 01 01 01 (in hexadecimal) In binary this would look like so: 00000001 00000001 00000001 00000001 Hope that's more clear now
You mean the C playlist? That one is just all the videos related to C on the order they were uploaded... They weren't made in a specific order and aren't supposed to have a continuity.
possibly the best channel on yt for c. extremely simple and clear explanation, nice accent and good approach to teaching
This is a hidden gem I hope everyone sees. Reading the documentation can be frustrating for beginners.
Just start to learn C and I found your channel, i just subcribed and I don't regret it.
Excellent series of over a hundred short videos (116) about basic computer functions and basic programming. These are the things every programmer should know master master first.
In youtube lots of channels are there but No one has ever say even one word about this topic
Thanks dude I was searching for this 🤟🤟
Thank you so much for such a clear explanation!!! Now I finally got the usage of these functions!
This is some great channel for C language
I have finished almost the full playlist "Unix process in c". I think some of the videos on this playlist are not in order. Anyway, your videos are helping me a lot.
Oh! Please do tell me which ones are not in order. I know RUclips sometimes messes up the order in there
Man you deserve even more subscribers and views, the effort you put into your videos is huge, thanks a lot. Also would have a question to you, I have some experience in C, and I really want to go through your tutorials, but I could not figure out what the real order of the videos are, could you help me out? Thank you best regards.
Thank you! Most videos don't have an orde aside from the linked list, processes and threads courses (which have their own playlist). They are meant as completely standalone videos so people can quickly understand a topic they are stuck on without having to go through hours of courses. But you're right, if you want to learn C from these videos it can be quite confusing... I will look into putting all videos in playlists basic on their topic, is that alright?
@@CodeVault I appreciate your help. Thank you very much.
informative video, thanks sir! one question you said 1 is four bytes in int which is 0001its four bit right so that means every number has its own four bit i did not quite understand! it is stored in hexadecimal format in the program?
"so that means every number has its own four bit"
Now here's where your misunderstanding begins.
A number, whether it be in the real world, in programming or in a video game doesn't HAVE bytes.
BUT, a variable, the place where we can store numbers in a computer, does have BYTES.
An INT usually has 4 bytes and a SHORT INT has 2 bytes.
---------------
When I said that the 1 inside an INT is 0 0 0 1, each digit represented a BYTE.
In hexadecimal it would be: 00 00 00 01
In binary (the way it is stored in memory) would actually be: 00000000 00000000 00000000 00000001
A 1 inside a SHORT INT i wrote it as 0 1, again, one digit per BYTE.
In hexadecimal it would be: 00 01
And in binary: 00000000 00000001
Notice the difference?
"it is stored in hexadecimal format in the program?"
No, it always goes down to bits.
So that was just a simplified notation on my part.
@@CodeVault Thank you so much for explaining it so precisely!
You have cleared all my doubts!
: )
@@CodeVault also had the same doubt, very much cleared by you!
@@CodeVault This is a part I struggled with as well. What I still can't understand is if it always goes down to bits, why didn't metset(arr1, 1,...) produce all bits as 1?
Rewatched the video, if I am not wrong, thats due to memset accepting bytes in second parameter and not bits, or better say whatever goes in second parameter is treated as a byte and not bit.
you are the best man !
Sorry i keep watching and you explained 👍💪
man you explained it so damn sharp!
Thank you so much!
Thank you so much!
Excellent series of videos with clear explanations!
But, the playlist is not organised.
Please, short them.
It would be much more clear.
Thanks a lot man!
Yeah, sorry about that, that playlist is just a collection of ALL the C videos on the channel (in chronological order). I will create some playlist based on their topic, but the order is still not going to matter as most of them are meant to be standalone.
awesome tutorial sir
Why memset only works with 0(zero)?
Be careful when comparing structs. Do the compare element by element in case the padding is different.
Thanks but padding and alignment won't be different on the same system
Great explanation mate
Appreciate you, man.
Thank you for your work
Hello ! Thank you for this great video. Would it be possible to have more explanation about the memset function ?
I understood that we get "16843009" for each number when we print the result of memset as an int (with %d) because the hexadecimal result is "01010101". But as you said "memset will set every single byte to 1", I would expect the result of memset to be something like "00000001". There is probably something I don't understand about memory. I am reading about it, but I am still confused.
Well, an int has 4 bytes. Since memset sets every byte to 1 (in the example in the video) we get:
01010101
Note that this notation is in hexadecimal and each 2 characters represent a single byte. If we were to write it in binary you would get this:
00000001000000010000000100000001
@@CodeVault it makes more sense now 😅 since I am new to this it’s still tricky sometimes !
I’ll read about the use of %x, but can you tell me if it is possible to use printf to print actual binary format ?
Thank you a lot ! :)
There's a video on it: code-vault.net/lesson/0iqp12va9m:1603820088926
@@CodeVault oh cool ! Thank you ! I finally made my own function to do that. But I’ll have a look at your video 👍🏼
wow woderfull explanation
I just discover your channel and want to watch all your videos on C. My skills in C declined in last years. Is there any order in which you should watch "The C programming language made simple"? I have on first position "Memory manipulation functions in C", definitely not "Hello World!" program. The latter being the most important program in the world!
The videos in that playlist were never made to be watched in any specific order. I did create some more specific playlists in which I added all the relevant videos and I put them in order from least complex to most complex (although, again, they are not perfect)
Here you can check them out: ruclips.net/user/CodeVaultplaylists
The Linked Lists, Unix Processes and Unix Threads playlists are actually made to be watched in order
Originally in the 1st int, we have a decimal expression of 0003, don't we?
I'm a little confused by how it was turned into the hexadecimal expression of 01010101.
Conversion looks like these: 0 01, 001, 001, 301. Why?
That's because of how memset works. So, let's take a look at arr1[0].
First we have the element 3, which is in hexadecimal: 00 00 00 03 (each pair for 2 hex digits represent a single byte)
Now, after we call memset(arr1[0], 1, 2 * sizeof(int));
memset will change each BYTE to have the value 1, so since arr1[0] is an int that has 4 bytes we will get this value in arr1[0]:
01 01 01 01 (in hexadecimal)
In binary this would look like so:
00000001 00000001 00000001 00000001
Hope that's more clear now
Hi is there any planning C++ concepts
Yes, OOP and memory management in C++ are some of the topics I will look into
ti indus?
a ti indus?
@@veronikaborozenets7789🫨🫨🫨yes
What if in memchr ima try to find the byte with a value of > 256
Since a byte can only go up to the value 255, you can't. You'll need to probably just make a for loop and check that manually.
CodeVault okay thank you :)))
bro u golden
can you suggest me c documentation?... I'm not able to find it.
The most reliable documentation that I use seems to be this site: www.cplusplus.com/reference/cstring/memset/
Small mistake : as c is little endian, the int 1 is actually : 1 0 0 0
That's correct. Good observation, it was a mistake on my part
Your videos are great but the playlist is not organised ... like i don’t understand which one is the first one in your playlist.
You mean the C playlist? That one is just all the videos related to C on the order they were uploaded... They weren't made in a specific order and aren't supposed to have a continuity.
@@CodeVault Please if you do find some time, do a C course you are very clear in your explanations!
good about memset!
6:31 6:32 6:33
The method for comparing array of int and array of short only works on little endian systems, be careful.
👍👍👍