#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; }
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 data type is not used for printing name , it is used to take integer input and also to print integer values that's why you're not getting the result if you would have been typing a name , so use char variable name[ ] ; then this will take character inputs meaning now you can type alphabetical names and use %s format specifier .
#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
@@sarwarriyaz Why can't you
Wow! This is impressive, you covered a lot with explicit explanation within few mins...Thank you sir.
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
youre the best i want to start game designing but i didnt find any free tutorials so thank you soo much
Aye you're back, welcome bro
Concise and comprehensive explanation. Thanks a ton.
Welcome back Bro. Thanks for another great video.
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😂
This is my seal. I have watched the entire video, understood it, and I can explain it in my own words, thus I have gained knowledge. This is my seal.
Mr Bro thanks for your time ,I just wanna told that you have a good explanation way m
Finally bro back to form
Amazing explanation
Love it, thanks for the video.😍😍
Dude this vídeo is just amazing, thanks!!!
Yis pls, more C stuff. Thank you very much. Good Stuff C is.
What are the most common type ppl usually use?
I found out, its int, char, short, long, bool and unsigned
thanks for the video
long long data type, ensures that it can accommodate the full range of memory addresses on the target system.
Thanks for the video Bro.
You're such a legend!!
welcome back!!!
wallah I love you bro
Welcome back bro
the video is helpful, but I need the link to the last video please ❤
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
🔥🔥❤❤DONE🔥🔥❤❤
THIS IS MY COMMENT THANK YOU BRO
Thank you ✅
you are awesome
Bro, you forgot to add this to playlist
where would i be without bro code
Thank you Bro :)
nice thanks :)
Oh. So. Pro.
❤❤❤❤❤❤❤
when i type string %s for bool its showing ☺
thank youuuu
Preciate you bro
YES C TUTORIAL
Thanks Bro
yey ^.^' another epick video !!!!
yehh love you bro :3
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❤
nice!
❤☺️
Thank you.
thanks man
I miss my bro 🙃
When googeling it said int is 2 byte or 4 byte though.
long long ago; /* in a galaxy far far away */
i like short shorts
that is a LOT of data types... geeze. unsigned signed int long short long long double signed short %.15llfdddduuuu
Oof, it feels like I am memorizing 'double' variables compared to java.
(5:49 A.M)
1 JUNE, 2024
i think it makes sense ;)
Всем привет!)
Why does it seem woman don't like c code ?
I will start from c :)
Hello
pagman clap the haters
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
Ass savior bro ❤
Bruh!
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;
}
int data type is not used for printing name , it is used to take integer input and also to print integer values that's why you're not getting the result if you would have been typing a name , so use char variable name[ ] ; then this will take character inputs meaning now you can type alphabetical names and use %s format specifier .
I like short shorts