What is size_t in C?

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

When programmers like you exists, it is easy to learn any tough programming language. Thanks for the good work. Though I am learning D, there exists some elements of C. So this video helped me a lot.

kcvinu
Автор

Great video, as are all the rest.
Your presentation style is very clear and has really helped me get my head around some of the intricacies of C.
Thank you!

samuelrawlinson
Автор

Just continue what you are doing...
be unique and simple....

kartikgehlot
Автор

Thanks im studying C and my textbook just vaguely mentioned this so i needed some further explanation!

sminter
Автор

Great video. Keep them coming. Your English is fine. Ignore the haters.

tahevol
Автор

4:20 It would loop forever only if a <= comparator is used, but you are showing a < comparison which wouldn't loop forever in the case strlen() returning the max value.

abrahamrodriguez
Автор

This is probably one of the best explanation of size_t

ShubhamMishra-mzzw
Автор

It is dangerous, because the range of strlen is like 0..2^32-1 usually and int range is like -2^31..2^31-1, so if strlen is more then 2^31-1, comparing will fail.

You could use unsigned int, that is better, but the problem is, this all assumes certain things about the size of a size_t. On some systems, maybe the size of size_t might not match unsigned. So best just to use size_t.

coolcodingcat
Автор

If you wear an earphone, when he types, you can feel some vibration !

abhi
Автор

Another very good course from a master!

PETERTRITSCH
Автор

your typing speed is amazing in coding...

kartikgehlot
Автор

Wonderful explaination ❤️
But, Could you please explain that line when you said something like that "This loop will goes to zero"
Please 🙏

manavroy
Автор

so you can still get elemets out of the array using array[i] even though i is size_t and array is integer type?

jonashart
Автор

Hello! Thank you very much for your videos! Could you explain how to multiply 40, 000 x 100, 000 in C. Only with integer type? Thank you!

jarosawnewidomski
Автор

what about ssize_t, size8_t, size16_t. Please explain.

jakepanda
Автор

Ok,
now tell me who can feel that heavy bass boom sound at 1:20
Edit: I like it
(I was watching this this video at midnight with my headphones on)

laveeshtomar
Автор

strlen should be called before the loop, otherwise you got O(N^2) instead of O(N).

coolcodingcat
Автор

so basically its only imporant for efficiency but int works fine, thanks

domc
Автор

it wont go forever, even if strlen is max size_t, because you are comparing <, so as soon as i == strlen, it will exit, if you were comparing <=, then, yes, it would, because it would loop around to 0, or negative, if you were using int

coolcodingcat
Автор

I've become a fan of u man...
Are u there on linked in

smnk