C format specifiers 🔧
HTML-код
- Опубликовано: 11 сен 2024
- C format specifiers % tutorial example explained
#C #format #specifiers
// format specifier % = defines and formats a type of data to be displayed
// %c = character
// %s = string (array of characters)
// %f = float
// %lf = double
// %d = integer
// %.1 = decimal precision
// %1 = minimum field width
// %- = left align
float item1 = 5.75;
float item2 = 10.00;
float item3 = 100.99;
printf("Item 1: $%8.2f
", item1);
printf("Item 2: $%8.2f
", item2);
printf("Item 3: $%8.2f
", item3);
return 0;
#include
int main(){
// format specifier % = defines and formats a type of data to be displayed
// %c = character
// %s = string (array of characters)
// %f = float
// %lf = double
// %d = integer
// %.1 = decimal precision
// %1 = minimum field width
// %- = left align
float item1 = 5.75;
float item2 = 10.00;
float item3 = 100.99;
printf("Item 1: $%8.2f
", item1);
printf("Item 2: $%8.2f
", item2);
printf("Item 3: $%8.2f
", item3);
return 0;
}
Good. Thank you for you :)
no %x02, or ll? :D
I think you are the best C explainer in RUclips. I'm subscribed and enjoying very much. I'll follow your Course to the end because of it.
hows your learning going?
C was the first language I learnt, Nice video.
From Mozambique.
Yes more c tutorials!!!
most of the videos are very short and easily understandable ! Thankyou for your efforts BRO!!!
Straight to the point, love that. Congrats, bro!
Hey Bro! Love your videos, really helped me learn java. I'd love to see functional programming videos on your channel after C, if that's possible
(thanks for the content btw)
Great video!
the explanation is on another level...you helped me a lot brother thankyou👏👏
Great!!! you tutorials and videos have helped me a alot great explaination :) you deserve 1 million subs man again Thanks!
your explain is very good i will watch all your videos
Understood 🤗❤ thanks
I made it here very quickly. I hope you stream soon
format specifiers are cool :)
Bro code thanks 💯. You just made my day
-ve sign is sometimes very useful.
really helped me man, thanks
very handy.. Thanks.
Hello Bro, hi everyone. So in the previous video, you said % is used to display the value of a variable. Here in this video, you said $ is used to insert a value wherever we want. I'm a bit confused. What's the difference?
no he just used $ to represent money , it doesn't really have any co-relation to the value itself
As the person above me said, the $ is just there to represent money, the code still runs without it
@@MrX-zf5gl ohh lmao i was confused aswell, thanks
thanks for the useful video!!!
thanks!
printf("cool");
#include
int main(){
printf("cool");
return 0;
}
❤❤❤❤❤❤❤
THANK YOU BRO
printf("You're too good bro!");
i know the syntax is similar but is it the same for java ?
thanks a lot
0:32 %lf = double float
super
🙏
DONE❤
learning C at the speed of light
ily bro
I love you
👍
A million of likes
11 seconds ago. Respect!
how can i format 1000 to 1.000 easily in C specially with ,
Hi again
Comment from your regular viewer 🙂
printf("code");
Eho?
what the fuck is %.2hx
Random
#include
int main()
{
char comment[] = "cool!";
printf("%s",comment);
}