C data types 📊
ฝัง
- เผยแพร่เมื่อ 24 มิ.ย. 2024
- C data types tutorial example explained
#C #data #types
char a = 'C'; // single character %c
char b[] = "Bro"; // array of characters %s
float c = 3.141592; // 4 bytes (32 bits of precision) 6 - 7 digits %f
double d = 3.141592653589793; // 8 bytes (64 bits of precision) 15 - 16 digits %lf
bool e = true; // 1 byte (true or false) %d
char f = 120; // 1 byte (-128 to +127) %d or %c
unsigned char g = 255; // 1 byte (0 to +255) %d or %c
short h = 32767; // 2 bytes (−32,768 to +32,767) %d
unsigned short i = 65535; // 2 bytes (0 to +65,535) %d
int j = 2147483647; // 4 bytes (-2,147,483,648 to +2,147,483,647) %d
unsigned int k = 4294967295; // 4 bytes (0 to +4,294,967,295) %u
long long int l = 9223372036854775807; // 8 bytes (-9 quintillion to +9 quintillion) %lld
unsigned long long int m = 18446744073709551615U; // 8 bytes (0 to +18 quintillion) %llu
printf("%c
", a); // char
printf("%s
", b); // character array
printf("%f
", c); // float
printf("%lf
", d); // double
printf("%d
", e); // bool
printf("%d
", f); // char as numeric value
printf("%d
", g); // unsigned char as numeric value
printf("%d
", h); // short
printf("%d
", i); // unsigned short
printf("%d
", j); // int
printf("%u
", k); // unsigned int
printf("%lld
", l); // long long int
printf("%llu
", m); // unsigned long long int - วิทยาศาสตร์และเทคโนโลยี
#include
#include
int main(){
char a = 'C'; // single character %c
char b[] = "Bro"; // array of characters %s
float c = 3.141592; // 4 bytes (32 bits of precision) 6 - 7 digits %f
double d = 3.141592653589793; // 8 bytes (64 bits of precision) 15 - 16 digits %lf
bool e = true; // 1 byte (true or false) %d
char f = 120; // 1 byte (-128 to +127) %d or %c
unsigned char g = 255; // 1 byte (0 to +255) %d or %c
short h = 32767; // 2 bytes (−32,768 to +32,767) %d
unsigned short i = 65535; // 2 bytes (0 to +65,535) %d
int j = 2147483647; // 4 bytes (-2,147,483,648 to +2,147,483,647) %d
unsigned int k = 4294967295; // 4 bytes (0 to +4,294,967,295) %u
long long int l = 9223372036854775807; // 8 bytes (-9 quintillion to +9 quintillion) %lld
unsigned long long int m = 18446744073709551615U; // 8 bytes (0 to +18 quintillion) %llu
printf("%c
", a); // char
printf("%s
", b); // character array
printf("%f
", c); // float
printf("%lf
", d); // double
printf("%d
", e); // bool
printf("%d
", f); // char as numeric value
printf("%d
", g); // unsigned char as numeric value
printf("%d
", h); // short
printf("%d
", i); // unsigned short
printf("%d
", j); // int
printf("%u
", k); // unsigned int
printf("%lld
", l); // long long int
printf("%llu
", m); // unsigned long long int
return 0;
}
bro i cant copy this for notes
youre the best i want to start game designing but i didnt find any free tutorials so thank you soo much
Welcome back Bro. Thanks for another great video.
brother you content is my new go to source for information on any coding questions i have, as a newbie they really help out a "long long int" haha
Wow! This is impressive, you covered a lot with explicit explanation within few mins...Thank you sir.
Aye you're back, welcome bro
Concise and comprehensive explanation. Thanks a ton.
Dude this vídeo is just amazing, thanks!!!
C is actually my favorite programming language
Do you Know Who Developed C.
@@shiva.sareddy definitely a couple of goated nerds
@@ichillingi Woof..😅
@@shiva.sareddy The guys who made Unix I think
You might not heard about. py😂
Yis pls, more C stuff. Thank you very much. Good Stuff C is.
Love it, thanks for the video.😍😍
Thanks for the video Bro.
Amazing explanation
You're such a legend!!
Finally bro back to form
Mr Bro thanks for your time ,I just wanna told that you have a good explanation way m
Preciate you bro
thank youuuu
Welcome back bro
welcome back!!!
nice!
the video is helpful, but I need the link to the last video please ❤
Thank you ✅
thanks man
Thank you Bro :)
Bro, you forgot to add this to playlist
long long data type, ensures that it can accommodate the full range of memory addresses on the target system.
yehh love you bro :3
Thank you.
wallah I love you bro
you are awesome
YES C TUTORIAL
chars can store every letter, symbol, number(0-9) and one char = 1 byte , one bool = 1 byte then why should we use bools
They make you look smarter
Thanks Bro
where would i be without bro code
good
when i type string %s for bool its showing ☺
I will start from c :)
Can you do objC?
maybe after C++, I'll likely have you guys vote on future topics
@@BroCodez isn't objC dead? wasn't it replaced by swift?
DONE❤
I miss my bro 🙃
Oh. So. Pro.
Oof, it feels like I am memorizing 'double' variables compared to java.
long long ago; /* in a galaxy far far away */
❤❤❤❤❤❤❤
Всем привет!)
i think it makes sense ;)
I like short shorts
that is a LOT of data types... geeze. unsigned signed int long short long long double signed short %.15llfdddduuuu
i like short shorts
(5:49 A.M)
1 JUNE, 2024
Hello
Ass savior bro ❤
Why does it seem woman don't like c code ?
Broooooo why why u r tooooo latee ....plz post it fast
I was burnt out -_-
I feel better now tho
He's been working for 2 years, he deserved a break.
Everyone needs a break once in a while
Bruh!
THIS IS MY COMMENT THANK YOU BRO
You can still use booleans without stdbool.h, just type _Bool instead of bool
Hello Bro Code, I tried to code this to get user input one by one but when I input the name of the brand, it shows everything and skips (Shipping time:, Price:). Do you know what is my error ? please?
#include
int main (){
int name;
float time;
double price;
// Input
printf ("Brand of water: ");
scanf ("%d", &name);
printf ("
Shipping time: ");
scanf ("%f", &time);
printf ("
Price: ");
scanf ("%lf", &price);
// printing
printf ("
Brand of water = %d", name);
printf ("
Shipping time = %f", time);
printf ("
Price = %lf", price);
return 0;
}