Тёмный

Difference Between %f And %lf Format Specifiers | C Programming Tutorial 

Portfolio Courses
Подписаться 202 тыс.
Просмотров 4,3 тыс.
50% 1

An explanation of the difference between the %f and %lf format specifiers in C, including when and how to use them with functions like printf and scanf. Source code: github.com/portfoliocourses/c.... Check out www.portfoliocourses.com to build a portfolio that will impress employers!

Опубликовано:

 

13 авг 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 8   
@Mnogojazyk
@Mnogojazyk Год назад
Well, I have a question: So far we’ve been using a fixed format of digits when outputting doubles and floats, i.e., a count of digits specified by the standard after the decimal mark. How does one vary from that? Suppose, for sample, I wanted to display only two digits after the decimal, e.g., show 3.14 instead of 3.1415926? Many thanks.
@PortfolioCourses
@PortfolioCourses Год назад
So to limit the digits we can use .# before the f. printf("%.2f", 3.1415926); for example.
@Mnogojazyk
@Mnogojazyk Год назад
@@PortfolioCourses, it’s that simple? Well, what do you know? Thanks!
@PortfolioCourses
@PortfolioCourses Год назад
You’re welcome! :-)
@Architector120
@Architector120 Год назад
so... now i have a question... can you explain how to make a function that accepts variable amount of arguments in C?
@PortfolioCourses
@PortfolioCourses Год назад
Yes great question! :-) I have a video on that topic here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-3iX9a_l9W9Y.html
@Architector120
@Architector120 Год назад
@@PortfolioCourses Thanks!.. somehow missed this video..
@PortfolioCourses
@PortfolioCourses Год назад
You’re welcome! :-)
Далее
🎙СТРИМ на 4 МИЛЛИОНА🍋
3:12:45
Просмотров 1,3 млн
Why I like C programming more than Web Dev (rant)
3:57
Null Terminator | C Programming Tutorial
15:05
Просмотров 3,1 тыс.
Function Pointers | C Programming Tutorial
18:31
Просмотров 57 тыс.
Premature Optimization
12:39
Просмотров 776 тыс.
Master Pointers in C:  10X Your C Coding!
14:12
Просмотров 291 тыс.