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;

Комментарии • 53

  • @BroCodez
    @BroCodez  3 года назад +28

    #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;
    }

  • @user-lg9fx1tx8e
    @user-lg9fx1tx8e Год назад +3

    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.

    • @yesh420
      @yesh420 11 дней назад

      hows your learning going?

  • @laerciomassapa7118
    @laerciomassapa7118 3 года назад +3

    C was the first language I learnt, Nice video.
    From Mozambique.

  • @cayden9224
    @cayden9224 3 года назад +11

    Yes more c tutorials!!!

  • @mebanteisalahe985
    @mebanteisalahe985 3 года назад +2

    most of the videos are very short and easily understandable ! Thankyou for your efforts BRO!!!

  • @CruelCDO
    @CruelCDO 5 месяцев назад

    Straight to the point, love that. Congrats, bro!

  • @vidhukant1073
    @vidhukant1073 3 года назад +7

    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)

  • @paolobena
    @paolobena 10 месяцев назад

    Great video!

  • @brianmanoti6030
    @brianmanoti6030 Год назад

    the explanation is on another level...you helped me a lot brother thankyou👏👏

  • @BugbountyPOCs41
    @BugbountyPOCs41 2 года назад

    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

  • @msliyanage8411
    @msliyanage8411 10 месяцев назад

    Understood 🤗❤ thanks

  • @capainsharp1447
    @capainsharp1447 Месяц назад

    I made it here very quickly. I hope you stream soon

  • @hat8694
    @hat8694 2 года назад +1

    format specifiers are cool :)

  • @mosopefoluwaadebawojo3543
    @mosopefoluwaadebawojo3543 2 года назад

    Bro code thanks 💯. You just made my day

  • @RajeshMondal
    @RajeshMondal 3 года назад +1

    -ve sign is sometimes very useful.

  • @ondralight411
    @ondralight411 Год назад

    really helped me man, thanks

  • @loverboykimi
    @loverboykimi 3 года назад

    very handy.. Thanks.

  • @okiukz3426
    @okiukz3426 Год назад +2

    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?

    • @MrX-zf5gl
      @MrX-zf5gl Год назад +5

      no he just used $ to represent money , it doesn't really have any co-relation to the value itself

    • @dkp8230
      @dkp8230 Год назад +2

      As the person above me said, the $ is just there to represent money, the code still runs without it

    • @yesh420
      @yesh420 11 дней назад

      @@MrX-zf5gl ohh lmao i was confused aswell, thanks

  • @multicitygirl5527
    @multicitygirl5527 2 года назад

    thanks for the useful video!!!

  • @kendalwilliams5128
    @kendalwilliams5128 6 месяцев назад

    thanks!

  • @raffawinters
    @raffawinters 2 года назад +4

    printf("cool");

    • @user-ly5we6xl4v
      @user-ly5we6xl4v 3 месяца назад

      #include
      int main(){
      printf("cool");
      return 0;
      }

  • @user-mc9uv7ij7x
    @user-mc9uv7ij7x Год назад

    ❤❤❤❤❤❤❤

  • @kapebreak
    @kapebreak Год назад

    THANK YOU BRO

  • @amayrali2239
    @amayrali2239 5 месяцев назад

    printf("You're too good bro!");

  • @fernandocamarena5634
    @fernandocamarena5634 11 дней назад

    i know the syntax is similar but is it the same for java ?

  • @devakinandan23
    @devakinandan23 2 года назад

    thanks a lot

  • @kshitijshah7744
    @kshitijshah7744 Месяц назад

    0:32 %lf = double float

  • @dr.x1382
    @dr.x1382 2 года назад

    super

  • @1antony072
    @1antony072 6 месяцев назад

    🙏

  • @user-ace96plays
    @user-ace96plays 3 месяца назад

    DONE❤

  • @oximas-oe9vf
    @oximas-oe9vf 2 года назад

    learning C at the speed of light

  • @adnanzahran467
    @adnanzahran467 Год назад

    ily bro

  • @Rin-xy4tt
    @Rin-xy4tt 2 года назад

    I love you

  • @leftlord
    @leftlord Год назад

  • @azeedhazard7638
    @azeedhazard7638 2 года назад

    👍

  • @quantaburocracia9683
    @quantaburocracia9683 4 месяца назад

    A million of likes

  • @vladnistor2864
    @vladnistor2864 3 года назад

    11 seconds ago. Respect!

  • @timesweird9442
    @timesweird9442 Год назад

    how can i format 1000 to 1.000 easily in C specially with ,

  • @tommyispog8026
    @tommyispog8026 3 года назад

    Hi again

  • @cadmium4113
    @cadmium4113 3 года назад

    Comment from your regular viewer 🙂

  • @student1999
    @student1999 11 месяцев назад

    printf("code");

  • @Mad-Ramx_Dev
    @Mad-Ramx_Dev 5 месяцев назад

    Eho?

  • @chocolateparfait9937
    @chocolateparfait9937 Год назад

    what the fuck is %.2hx

  • @jeremyrecker4081
    @jeremyrecker4081 Год назад

    Random

  • @Santos_S._D
    @Santos_S._D Год назад

    #include
    int main()
    {
    char comment[] = "cool!";
    printf("%s",comment);
    }