Know your data type: int - C Programming Tutorial 08

  Рет қаралды 235,399

mycodeschool

mycodeschool

Күн бұрын

See complete series on C programming here:
• Introduction to Progra...
In this tutorial, we have discussed int data-type in detail.
We have explained below concepts:
How data is stored in computer's memory.
Size and range of int
Signed and unsigned int
How negative numbers are stored in binary.
About binary number system:
• What is binary number ...
About 2's complement notation:
www.cs.cornell....
For more such videos and updates, subscribe to our channel:
/ mycodeschool
You may also like/follow us on Facebook/Twitter:
/ mycodeschool
/ mycodeschool

Пікірлер: 212
@dryyrun
@dryyrun 3 жыл бұрын
I have to admit this: This is the single tutorial I ever watched on KZbin till date where I understood 100% without putting any stress on my head. No words to describe the excellence of this masterpiece.
@diptisarkar4849
@diptisarkar4849 4 жыл бұрын
i came across this channel just some time ago and the videos were so good that i fell in love with them and watched all the 9 videos in this playlist only to come to the comment section to find that the creator has passed away. It is such a shame that he is not with us anymore. i am probably too late to say this, but RIP. WE LOVE YOU.
@gayatribagul2008
@gayatribagul2008 3 жыл бұрын
omg i m shooked i think we lost a very genius person so sad to read this....
@shubham2076
@shubham2076 3 жыл бұрын
@@gayatribagul2008 actually creator is not pass away co-creator died his name was Harsha The guy speaking is alive
@gayatribagul2008
@gayatribagul2008 3 жыл бұрын
@@shubham2076 oh
@RajKumar-tk7jm
@RajKumar-tk7jm 8 жыл бұрын
Too good. I appreciate your depth of knowledge on these concepts. "Little endian" and "Big Endian" terms I am hearing for the first time and this architecture is the reason for the memory arrangement is a very valuable piece of informantion that I have learnt from your video. Thanks a Lot!
@thestarinthesky_
@thestarinthesky_ 4 жыл бұрын
YOU MADE US LOVE PROGRAMMING and everything related to computer systems! It is 2020 and you are still amazing! I do know how to express my thankfulness towards these series. I wish you could come back. Please consider coming back to here.
@sudiptaranjanpatra1876
@sudiptaranjanpatra1876 3 жыл бұрын
You may not know him even I didn't, he lost his life in a tragic accident after being hit by a car. For this reason he hasn't uploaded any more content since 6 years.
@arunsharma2999
@arunsharma2999 2 жыл бұрын
@@sudiptaranjanpatra1876 actually no..he works at Google now.. stopped as his partner met with an accident
@youthfull3616
@youthfull3616 5 жыл бұрын
I fell in love with your teaching mechanism. Amazing teaching and interpretation of basic stuffs like this. I have watched many of your videos like data structures and trees. I bow to you.
@pravinlohare9033
@pravinlohare9033 7 жыл бұрын
This cleared my most curious doubt of size and limits, Thanks!!!
@worldclassmediocre9275
@worldclassmediocre9275 3 жыл бұрын
All these big channels that make entire series on these topics fail to teach them in such a thorough and easy to understand way. Thank you
@bhagyashreemore1045
@bhagyashreemore1045 6 жыл бұрын
It's 2018 and your video is on top search list..And yes it deserve to be. This is best explanation method,technique, knowledge too good. I never heard such an detailed explanation on datatypes. Thank you for this great video..good work :)
@vikranttyagiRN
@vikranttyagiRN 6 жыл бұрын
Please continue this series on C It is my humble request to you. You are so much more understandable than my university teacher and you are really amazing at what you do. Please continue it. it really helps the beginners like me
@aryanverma7800
@aryanverma7800 4 жыл бұрын
@rakesh singh 😪
@hukamdeepsinghgill6059
@hukamdeepsinghgill6059 6 жыл бұрын
Thanks Animesh, Your way to make others understand the concept and fundamentals is really easy and in depth
@ibrahel1
@ibrahel1 3 ай бұрын
This is what i need as comp engineering student. Many tutorial there are just not enough to fill my curoisity. But this make me more understood about c and memory management. Thanks
@mayurgite4050
@mayurgite4050 8 жыл бұрын
Thanks a lot for great depth of explanations... Specially last interesting part.. Usually what we learnt previously that it is just a garbage value and we need to ignore it. But thanks for teaching us that why only that value come as output.
@SatishSingh-mk7jq
@SatishSingh-mk7jq 2 жыл бұрын
You are the best there has been on youtube ! RIP for fellow viewers, at 20:00 , when he is explaining how a stored signed integer is interpreted by the system to print it... he takes 2's complement. i.e. in order to store the -ve integer, you convert it to 2's complement and store it... As WELL AS,.... in order to print it .. again it converts that stored 2's complement to (once more) 2's complement of itself. Hence 2's complement operation is applied both direction while storing as well as fetching for NEGATIVE integers
@exploreinto7025
@exploreinto7025 Жыл бұрын
very fantastic & fabulous explanation , No one explain at this level
@kishoremahato9947
@kishoremahato9947 7 жыл бұрын
im telling you.. you are the best teacher .. please continue your series
@shashanktiwari3679
@shashanktiwari3679 5 жыл бұрын
He is no more. RIP Harsha Suryanarayana.
@yourdailymusic6906
@yourdailymusic6906 8 жыл бұрын
It's 2016! You make things very clear. Continue the series plz!
@shayansec
@shayansec 3 жыл бұрын
This is the most crystal clear video on memory consumption by programs...
@G1991boah
@G1991boah 5 жыл бұрын
pls gimme moar!! tho i already kno the basics, your style is fluid and very detailed!
@TheFlyguy31
@TheFlyguy31 9 жыл бұрын
When you explained 2's compliment, everything came together...thank you
@stctuts9415
@stctuts9415 6 жыл бұрын
Watch this video also on Data types in C kzbin.info/www/bejne/qJqVgmCrqriMr68 Giver your feedback and support Please promote this channel to others Thank Your
@neeteshmangal4115
@neeteshmangal4115 4 жыл бұрын
this is really happen that i am commenting somewhere .....i had a lot of doubts in memory allocation because it is complicated also...but now from your teaching i am very happy and feeling awesome like now i can explain to someone also... really thankyou for your work i just loved it
@nitsarabz3747
@nitsarabz3747 2 жыл бұрын
It is 2021 and I just started the c and you dont know how much it was helpful. Thank you for this great video 👍🏻👍🏻👍🏻👍🏻👍🏻
@startrek3779
@startrek3779 4 жыл бұрын
Hi bro. You did such a great job! Thank you so much for your effort. I really appreciate it. This series of courses are excellent not only for absolute beginners but also for people who have experience in programming and want to fill in some missing parts.
@kdeasif8287
@kdeasif8287 7 жыл бұрын
You are a god man, Not even in college explained this
@Enemy_Birds
@Enemy_Birds 9 жыл бұрын
Why are there no more videos? You explain things so well and I am sad I have to try to find other videos to pick up where this one left off.
@ankitjain-1
@ankitjain-1 4 жыл бұрын
Our Teacher is no more? He passed away in a car accident 5 years ago . :(. Edit: I was wrong, our teacher is still alive, his co-worker passed away. Actually he was our teacher's senior.
@peterpace3379
@peterpace3379 4 жыл бұрын
@@ankitjain-1 His assistant passed away, not him.
@digvijaymane2192
@digvijaymane2192 6 жыл бұрын
please resume series and make more series on another languages ...you are best
@achieverism
@achieverism 10 жыл бұрын
I think it would be great to include some bit operation problems (bit-shift problems) that will further delve into explained concepts later in these lectures.
@fithawighide6589
@fithawighide6589 4 жыл бұрын
let me say only "WOW" you are great man!
@KashifKhan-tq1um
@KashifKhan-tq1um 3 жыл бұрын
Old is Gold Amazing Sir Love You
@maitreyeemandal9545
@maitreyeemandal9545 3 жыл бұрын
Can't believe that this great teacher is no more....RIP
@elementallobsterx
@elementallobsterx Ай бұрын
😢
@dharmendrakoppineni2752
@dharmendrakoppineni2752 7 жыл бұрын
Your classes are highly helpful. Thank you, sir.
@ghosthunternotclickbaitaka1997
@ghosthunternotclickbaitaka1997 3 жыл бұрын
Highly appreciated. Thanks for clearing the basic concept and teaching in-depth.
@ewertonal
@ewertonal 5 жыл бұрын
Please, continue this series!!
@ankitjain-1
@ankitjain-1 4 жыл бұрын
Our Teacher is no more? He passed away in a car accident 5 years ago . :(
@SunnyApples
@SunnyApples 7 жыл бұрын
You are so amazing, thanks for the tutorial!
@nickchang2079
@nickchang2079 10 жыл бұрын
Loving this tutorial series, when will new one be upload ? Can't wait :)
@chukwuemekaobuji1461
@chukwuemekaobuji1461 Жыл бұрын
It's 2022, your teaching is so good
@prodiptamondal1758
@prodiptamondal1758 3 жыл бұрын
No one can reach the level of mycodeschool teaching
@thondaladinnemaneesha9080
@thondaladinnemaneesha9080 6 жыл бұрын
Instead of these 9vedios i want complete tutorials On c how to gain only u r vedios u had done a very good job bro
@bz101
@bz101 Жыл бұрын
seemed insignificant at first glance, but actually this is a very solid video. provides the foundation for CS
@oteguobaemmanuel7728
@oteguobaemmanuel7728 2 жыл бұрын
Bro thanks I understand everything this is 2022 and I love the way you explain the concept.i jus wish u upload more videos. Buh I am sure it will never happen
@haripriya6651
@haripriya6651 7 жыл бұрын
U r BEST I'm very glad to be a part of this mycodeschool.com as a student . Bcoz without this there is no C language for me. Really Thanku Sir
@stctuts9415
@stctuts9415 6 жыл бұрын
Watch this video also on Data types in C kzbin.info/www/bejne/qJqVgmCrqriMr68 Giver your feedback and support Please promote this channel to others Thank Your
@r7moony1
@r7moony1 5 жыл бұрын
Man you are the master of c, many thanks from the heart SIR
@JoseDavid-bv8lo
@JoseDavid-bv8lo 5 жыл бұрын
Very intuitive. Mostly by the friendly accent for other-nationality students.
@hfe1833
@hfe1833 4 жыл бұрын
This is the best explaination and example of data types for me
@hackeroid9978
@hackeroid9978 4 жыл бұрын
the best video I have watched amongst all the C tuts !! keep up dude
@zobkpk
@zobkpk 7 жыл бұрын
Thankyou ! Perfectly explained every single point . Well done .
@chinmay9402
@chinmay9402 3 жыл бұрын
Connected everything properly. Thanks mate.
@vivekmesuriya6357
@vivekmesuriya6357 Жыл бұрын
Very helpfull and informative
@sushaneraviteja7389
@sushaneraviteja7389 7 жыл бұрын
thank you sir .great explanation
@olaoluwaraji2335
@olaoluwaraji2335 6 жыл бұрын
A very informative video. Now I understand the concept better. Thanks a lot.
@amitsaini821
@amitsaini821 6 жыл бұрын
Thanks a lot sir, please makes more classes on C. The way you are learning is easy and fabulous
@sonomrubayat8485
@sonomrubayat8485 4 жыл бұрын
RIP Man !!I wish you were alive to see how you are helping people
@dedenkabalumam3349
@dedenkabalumam3349 Ай бұрын
come back, sir! we need you to teach us
@vivekanandhiremath423
@vivekanandhiremath423 8 жыл бұрын
1 can be represented in 4 bit binary as (2's complement) 1111 15 is also represented as 1111. So, how does CPU differentiate between 15 and -1 when it gets values from memory?
@varunaggarwal1995
@varunaggarwal1995 8 жыл бұрын
1111 is not the real value of -1(it is kind of representation to represent -ve stuff), here most significant 1 is used to represent that it is a signed integer, to calculate real value of -1 calculate 2's complement of remaining 3 bits(leave out the MSB) which is 001. So, MSB represents sign and later digits when 2's complemented represents magnitude.
@IIM_life_by_Divya
@IIM_life_by_Divya 4 жыл бұрын
Mind blowing explanation sir am very full thank full to u sir
@rehaninamdar6641
@rehaninamdar6641 Жыл бұрын
That's reason why Called Lord Harsha❤ Miss you legend🙏
@AmmarAl_higary
@AmmarAl_higary 7 ай бұрын
The maker of this video still alive
@yomib
@yomib 7 жыл бұрын
the math and 2s binary storage concept smacked me over the head a bit but it all came together at the end
@paperboatsintherain6361
@paperboatsintherain6361 3 жыл бұрын
What a great breakdown on this topic!
@achieverism
@achieverism 10 жыл бұрын
Completely explained in a very simpler way!
@elescoces33
@elescoces33 7 жыл бұрын
Wow!! I've taken classes on CS at Harvard and your lectures are really world-class. Where did you learn!?
@stctuts9415
@stctuts9415 6 жыл бұрын
Watch this video also on Data types in C kzbin.info/www/bejne/qJqVgmCrqriMr68 Giver your feedback and support Please promote this channel to others Thank Your
@pymondo1147
@pymondo1147 6 жыл бұрын
Man i didnt know about windows calculator for binary.. Awesome explanation brother .. Thank you so much...:):)
@aashishkumarmisraa4544
@aashishkumarmisraa4544 9 жыл бұрын
When will you release the continuation videos of "Intro to c programming"?
@aryanverma7800
@aryanverma7800 4 жыл бұрын
@rakesh singh how do you know
@waitwhat3547
@waitwhat3547 3 жыл бұрын
He won't I think he died in an accident
@Sam-hq2yr
@Sam-hq2yr 3 жыл бұрын
@@aryanverma7800 yeah, he died in an accident in 2014. You can read their and this Channels amazing history on freecodecamp. i think they have an article about @MyCodeSchool.
@Sam-hq2yr
@Sam-hq2yr 3 жыл бұрын
they are two people, one of them died in 2014.
@apelsin3001
@apelsin3001 3 жыл бұрын
Very cool lesson. With respect from Russia.
@bedaresaisrujana7590
@bedaresaisrujana7590 4 жыл бұрын
How to write on the white screen. Plz tell sir. Ur way of presentation is very good.
@stormbreaker9913
@stormbreaker9913 2 жыл бұрын
Please upload more videos on C it helped a lot
@damiendivittorio6973
@damiendivittorio6973 7 жыл бұрын
Please continue the series!
@TheSasank2102
@TheSasank2102 9 жыл бұрын
thanks for making there videos.can u make a video on storage classes of variables(auto,extern,static)
@Svtnonefineday
@Svtnonefineday 4 жыл бұрын
Tq 🙏🏻 seriously u r amaaaazing sir. Gud teaching skills.
@ramprakashgovindaraj5343
@ramprakashgovindaraj5343 9 жыл бұрын
Thank you soo much friend.. even-though this is very basic.. now i got a clear pic of the arithmetic operation and how it works in the language... once again thank you so much #mycodeschool
@faijeahmedtusher9248
@faijeahmedtusher9248 8 жыл бұрын
Please complete C series.
@geetasaisruthi2621
@geetasaisruthi2621 7 жыл бұрын
excellent sir, thank you for your clear explanation, Please upload some more videos.
@sirnawaz
@sirnawaz 10 жыл бұрын
Good tutorial. However, pedantically speaking: - In C (and C++), a byte is NOT necessarily 8 bits. It could be other than 8 bits as well. That is the reason why these two languages have defined a macro called CHAR_BIT whose value happens to be 8 on most machines but there are machines where it is different from 8. Interesting, isn't it? Note that a byte is defined to be "the basic addressable" unit which means its size depends on the size of the execution character set on a given machine. - sizeof is NOT a function, it is a *compile-time* operator (though in C99, it is a runtime operator as well). Please let me know if you've any doubt/concern/question. I'd like to help you to improve the content of these tutorials. :-)
@mycodeschool
@mycodeschool 10 жыл бұрын
Sarfaraz Nawaz bit and byte are units. It has nothing to do with a programming language or machine architecture. 1 byte = 8 bits just the way 1 Kilo-meter = 1000 meters.
@sirnawaz
@sirnawaz 10 жыл бұрын
mycodeschool Not really. The size of a byte depends on the machine, hence in C and C++, the size of a byte is defined to be implementation-defined, which is why C and C++ compilers are "required" to define a macro called CHAR_BIT. Otherwise, if 1 byte is always 8 bits, then such a macro would not be required by the language specification. Have a look at the wikipedia (at least) before you comment further. It says, "The C standard requires that the char integral data type is capable of holding at least 256 different values, and is represented by at least 8 bits (clause 5.2.4.2.1). Various implementations of C and C++ reserve 8, 9, 16, 32, or 36 bits for the storage of a byte.[10][11] The actual number of bits in a particular implementation is documented as CHAR_BIT as implemented in the limits.h file. Java's primitive byte data type is always defined as consisting of 8 bits and being a signed data type, holding values from −128 to 127." en.wikipedia.org/wiki/Byte I don't trust Wikipedia usually but this information is 100% accurate! I'm sure you're surprised to know that byte is NOT necessarily 8 bits. (I know that is what is taught in colleges...even in IITs and IIITHs..but they're WRONG!).
@sirnawaz
@sirnawaz 8 жыл бұрын
+Nick G . 1 byte == 8 bits is true for most systems. However, it is not true for all systems, and the two languages C and C++ definitely do NOT define "1 byte" to be "8 bits". In these languages (and at machine level), a byte is defined to be smallest "addressable"' unit and thus it does not restrict the number of bits in it to be 8. It could be 9 as well. In fact, there existed some systems where 1 byte == 9 bits. Please do some research before commenting further. stackoverflow.com/questions/5516044/system-where-1-byte-8-bit
@NoOne-ky1er
@NoOne-ky1er 4 жыл бұрын
C/C++ might had been different in definition of 1 byte. But 1 bit does have a physical significance as 0 or 1. When flip-flop stores a data, we call it bit.
@sirnawaz
@sirnawaz 4 жыл бұрын
@@NoOne-ky1er What is the relevance of that with regards to what I said here?
@ayoubnaoui5239
@ayoubnaoui5239 11 ай бұрын
This is 100% good sir
@Adhavoktha
@Adhavoktha 4 жыл бұрын
🙌...no words to say .... such an amazing job ...🔥
@rahulkirpekar5465
@rahulkirpekar5465 8 жыл бұрын
superb video Keep it up.....
@surenbono6063
@surenbono6063 4 жыл бұрын
...use short ( 2 byte) =8bit+8bit=16bit = 255*255 val range =-32768 to 32767 value if signed or 0 to 65535 unsigned , than int (4byte) to optimise memory..for counter...etc
@zilggin
@zilggin 9 жыл бұрын
Very informative video, thanx. Just wanted to understand; the number (2 x 10 ^ 10) plotted into the calculator and then converted into binary is not the same binary number which you drew on the screen. Why are the binary numbers different?
@aparichit-thestranger3862
@aparichit-thestranger3862 3 жыл бұрын
Yeah great you noticed that, and I noticed your comment, could some one tell me, but most probably it has long since you commented
@blahblah1796
@blahblah1796 2 жыл бұрын
@@aparichit-thestranger3862 the binary numbers are different because binary numbers consists of only 0's and 1's
@flyingspaghettimonster3791
@flyingspaghettimonster3791 7 жыл бұрын
plz make more videos. This one was very good
@fmashikmahamud826
@fmashikmahamud826 6 жыл бұрын
Excellent to understand.. Thanks.
@balakrushnabehera2800
@balakrushnabehera2800 7 жыл бұрын
Wonderful video sir Please do video on storing float and char data type variables please
@md.mominulislamrubel5186
@md.mominulislamrubel5186 5 жыл бұрын
It was really helpful
@varshachaudhary9341
@varshachaudhary9341 6 жыл бұрын
amazing videos .... sir please make more videos on c programming
@snowfall1984
@snowfall1984 6 жыл бұрын
Very nice explanation!
@Ivanus59
@Ivanus59 8 жыл бұрын
So no part 9? :/ Where should I continue on from this video?
@hrushikeshkale68
@hrushikeshkale68 4 жыл бұрын
Yep this dude left us
@amoghnath3330
@amoghnath3330 4 жыл бұрын
one of the founders of this youtube channel passed away
@ramyar6785
@ramyar6785 8 жыл бұрын
Please do upload next videos on Arrays, Pointers, Structures and Functions.
@XTREME__AUDIO
@XTREME__AUDIO 7 жыл бұрын
please continue making more video for coding C , C++ , Java , python etc..... i want more tecknical
@stctuts9415
@stctuts9415 6 жыл бұрын
Watch this video also on Data types in C kzbin.info/www/bejne/qJqVgmCrqriMr68 Giver your feedback and support Please promote this channel to others Thank Your
@alessandroporfirio1910
@alessandroporfirio1910 6 жыл бұрын
Vary good lecture! Thank you!
@krishanudutta2943
@krishanudutta2943 3 жыл бұрын
I came to know about him before sometime may his soul rest in peace..
@heyitsritu
@heyitsritu 5 жыл бұрын
please come back don't ditch us like this
@sajidmajeed5321
@sajidmajeed5321 4 жыл бұрын
You doing great
@aadityagupta9539
@aadityagupta9539 4 жыл бұрын
Great job sir.
@krishnaverma5522
@krishnaverma5522 7 жыл бұрын
very useful video...thank you so much sir :)
@SuryanshuDinkar
@SuryanshuDinkar 4 жыл бұрын
Its beautiful
@ShawnDypxz
@ShawnDypxz 4 жыл бұрын
Sir, Please recommend me a book. I am a beginner, but I want to learn in depth as you know about C.
@sivaramarajusiv7826
@sivaramarajusiv7826 7 жыл бұрын
nice explanation
@057anmolkesarwani4
@057anmolkesarwani4 3 жыл бұрын
Amazing
@ahcenebelhadi955
@ahcenebelhadi955 2 жыл бұрын
suscribed !
@momtahenabindu9488
@momtahenabindu9488 6 жыл бұрын
Love this video
@danielkevinfernandez7698
@danielkevinfernandez7698 5 жыл бұрын
DAMN U R SUCH A GOOD TEACHER WHY DID U STOP ???
@siddhartha8886
@siddhartha8886 4 жыл бұрын
He did not stop dear, He is no more in the world, He passed away half a decade ago.
@gurusankar692
@gurusankar692 7 жыл бұрын
why integer occupies different bytes of data on different platforms like 2 bytes or 4bytes
@m.k.6497
@m.k.6497 4 жыл бұрын
better than cs50.
Pointers and dynamic memory - stack vs heap
17:26
mycodeschool
Рет қаралды 1,4 МЛН
C data types 📊
11:08
Bro Code
Рет қаралды 76 М.
Expected Ending?
00:45
ISSEI / いっせい
Рет қаралды 4,9 МЛН
The CUTEST flower girl on YouTube (2019-2024)
00:10
Hungry FAM
Рет қаралды 53 МЛН
Amazing Parenting Hacks! 👶✨ #ParentingTips #LifeHacks
00:18
Snack Chat
Рет қаралды 20 МЛН
Comparing C to machine language
10:02
Ben Eater
Рет қаралды 5 МЛН
Object-Oriented Programming Is The Root Of All Evil
25:16
Abstract Engineering | الهندسة المجردة
Рет қаралды 9 М.
Fast Inverse Square Root - A Quake III Algorithm
20:08
Nemean
Рет қаралды 5 МЛН
Makefiles, but in English
55:45
801Labs
Рет қаралды 29 М.
Intro to Competitive Programming
11:41
Junferno
Рет қаралды 776 М.
you will never ask about pointers again after watching this video
8:03
Low Level Learning
Рет қаралды 2,2 МЛН
How do computers read code?
12:01
Frame of Essence
Рет қаралды 3,1 МЛН
Expected Ending?
00:45
ISSEI / いっせい
Рет қаралды 4,9 МЛН