size_t In C And C++

  Рет қаралды 33,932

CppNuts

CppNuts

5 жыл бұрын

JOIN ME
-----
KZfaq 🎬 / @cppnuts
Patreon 🚀 / cppnuts
COMPLETE PLAYLIST
------------
C++ Tutorial For Beginners: • Introduction To C++
STL (Standard Template Library): • STL In C++
ThreadIng In C++: • Multithreading In C++
Data Structures: • Data Structure
Algorithms: • Binary Search
Design Patterns: • Factory Design Pattern...
Smart Pointers: • Smart Pointer In C++
C++14: • Digit Separator In C++
C++17: • std string_view in C++...
C++ All Type Casts: • static_cast In C++
INTERVIEW PLAYLIST
------------
C++ Interview Q&A: • Structural Padding & P...
C++ Interview Q&A For Experienced: • How delete[] Knows How...
Linked List Interview Questions: • Find Kth Node From Bac...
BST Interview Questions: • Search Element In Bina...
Array Interview Questions: • Reverse An Array
String Interview Questions: • Check String Is Palind...
Bit Manipulation Questions: • Find Set Bit In Intege...
Binary Tree Interview Question: • Invert Binary Tree
Sorting Algorithms: • Bubble Sort
C++ MCQ: • Video
C MCQ: • What printf returns af...
C Interview Questions: • Designated Initializat...
QUICK SHORT VIDEOS
-------------
C++ Short : • C++ Short Videos
C Short : • Shorts C Programming MCQ
In this video we will learn about the "size_t" data type in C/C++ programming language.
POINTS:
1. It is used to represent size of objects/variables in bytes.
2. sizeof returns this data type only.
3. It guarantee to be big enough to contain the size of the biggest object that system can handle.
a. If compiler is 32 bit: IT IS typedef of unsigned int
b. If compiler is 64 bit: IT IS typedef of unsigned long long.
4. It is never negative.
5. Standard functions use this type for count/number.
a. malloc (size_t)
b. memcpy (destination, source, size_t)
c. size_t strlen (const char*)
#cprogramming #cpp #programming #tutorial #computerscience #softwareengineering

Пікірлер: 34
@umndrk600
@umndrk600 14 күн бұрын
Thankyou so much for explain size_t.
@satyamkumaarr
@satyamkumaarr 28 күн бұрын
most under-rated one......!!
@abhinavrawal6968
@abhinavrawal6968 2 жыл бұрын
Finally someone who clears it! Thanks a lot!
@ganeshkumar269
@ganeshkumar269 4 жыл бұрын
new favourite channel. Great Videos!
@CppNuts
@CppNuts 4 жыл бұрын
Thanks man!!
@amineahardane999
@amineahardane999 5 жыл бұрын
what does it mean "big enough" ? size_t choose the type in base of your operations? or just the biggest size of the system? and if i must rappresent for example, n>0 && n
@ashwinalagiri-rajan1180
@ashwinalagiri-rajan1180 2 жыл бұрын
by big enough I think he means that the size of the integer that you create with size_t matches the size of architecture of your os. 64 bit -> 64 bit int 32 -> 32bit int
@benbenson8967
@benbenson8967 4 жыл бұрын
SUPER helpful thank you!
@CppNuts
@CppNuts 4 жыл бұрын
Glad it helped.
@MindFlowBYT
@MindFlowBYT 3 жыл бұрын
That is one great video but could you explain to me what is the difference between size_t and unsigned long long in 64bit for example? Because I do not understand why should I use size_t instead of unsigned type.
@Stormrage699
@Stormrage699 2 жыл бұрын
Portability
@raghavjuyalcomedydancedeew636
@raghavjuyalcomedydancedeew636 2 жыл бұрын
Thank you sir for clearing my annoying doubt.
@CppNuts
@CppNuts 2 жыл бұрын
You are welcome..
@aninexclusive466
@aninexclusive466 4 жыл бұрын
You're an amaizing teacher.
@CppNuts
@CppNuts 4 жыл бұрын
Thanks man!!
@clinitajoy5709
@clinitajoy5709 4 жыл бұрын
Thnk you so much🥰
@CppNuts
@CppNuts 4 жыл бұрын
You’re welcome 😊
@yutaitadori7318
@yutaitadori7318 3 жыл бұрын
U r loyal to your viewers 👏
@CppNuts
@CppNuts 3 жыл бұрын
I try
@himanshurajpal7842
@himanshurajpal7842 3 жыл бұрын
Have u any other social media platform , I wanna join. Brother'!! You are very great❤️
@CppNuts
@CppNuts 3 жыл бұрын
Check description.. Or check channel page for linkedin.
@cid007007
@cid007007 4 жыл бұрын
#include using namespace std; void print(size_t count) { while(count++) { cout
@CppNuts
@CppNuts 4 жыл бұрын
It wont give any warning, it will just go to reverse. meaning for example suppose if size_t supports number from 0 to 100 and you said -1 it will print 100 and if you say -2 it will print 99. So it goes in reverse. Please do this experiment with char, because it is smaller and you can get the realisation quickly. Example: unsigned char c = -1; cout
@frenchmike
@frenchmike 5 жыл бұрын
screen is dark, can't see
@abdelrahmanyasser5720
@abdelrahmanyasser5720 5 жыл бұрын
wear a night vision glasses
@abhinavchauhangujjar6456
@abhinavchauhangujjar6456 5 жыл бұрын
You deserve more subscribers
@raulsebastianriveramartine9821
@raulsebastianriveramartine9821 5 жыл бұрын
i see , just accepts positive values!!thats it.
@CppNuts
@CppNuts 4 жыл бұрын
Correct!!
@jubeshjoseph1766
@jubeshjoseph1766 5 жыл бұрын
Music atfirst?
@CppNuts
@CppNuts 5 жыл бұрын
To refersh the mood 😁
@jubeshjoseph1766
@jubeshjoseph1766 5 жыл бұрын
@@CppNuts i mean what is the music that you used beginning of your video bro?
@jubeshjoseph1766
@jubeshjoseph1766 5 жыл бұрын
@@CppNuts Anyway your tech good ,i like it!
@CppNuts
@CppNuts 5 жыл бұрын
I took it from some online free music website, and i forgot that website. 😊
@jubeshjoseph1766
@jubeshjoseph1766 5 жыл бұрын
@@CppNuts anyway i got it it's kzfaq.info/get/bejne/htiDfZxml9qagX0.html
Template In C++
10:36
CppNuts
Рет қаралды 32 М.
Master Pointers in C:  10X Your C Coding!
14:12
Dave's Garage
Рет қаралды 293 М.
How Many Balloons Does It Take To Fly?
00:18
MrBeast
Рет қаралды 205 МЛН
ПРОВЕРИЛ АРБУЗЫ #shorts
00:34
Паша Осадчий
Рет қаралды 7 МЛН
Finger Heart - Fancy Refill (Inside Out Animation)
00:30
FASH
Рет қаралды 29 МЛН
Они так быстро убрались!
01:00
Аришнев
Рет қаралды 2 МЛН
Overloading new And delete Operator In C++
21:59
CppNuts
Рет қаралды 22 М.
size_t Type | C Programming Tutorial
7:17
Portfolio Courses
Рет қаралды 12 М.
Move Semantics in C++
13:10
The Cherno
Рет қаралды 286 М.
31 nooby C++ habits you need to ditch
16:18
mCoding
Рет қаралды 756 М.
Join And Detach In C++
17:15
CppNuts
Рет қаралды 62 М.
you will never ask about pointers again after watching this video
8:03
Low Level Learning
Рет қаралды 2,1 МЛН
C++ vs Rust: which is faster?
21:15
fasterthanlime
Рет қаралды 385 М.
Bit Fields In C & C++
20:36
CppNuts
Рет қаралды 21 М.
you will never ask about pointer arithmetic after watching this video
8:01
Low Level Learning
Рет қаралды 237 М.
How Many Balloons Does It Take To Fly?
00:18
MrBeast
Рет қаралды 205 МЛН