Тёмный

C constants 🚫 

Bro Code
Подписаться 2 млн
Просмотров 27 тыс.
50% 1

C constants tutorial example explained
#C #constants #tutorial
// constant = fixed value that cannot be altered by the program during its execution
const float PI = 3.14159;
//PI = 420.69; YOU CAN'T CHANGE THIS
printf("%f", PI);
return 0;

Наука

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

 

16 авг 2021

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 33   
@BroCodez
@BroCodez 3 года назад
#include int main(){ // constant = fixed value that cannot be altered by the program during its execution const float PI = 3.14159; //PI = 420.69; YOU CAN'T CHANGE THIS printf("%f", PI); return 0; }
@adityachimte5728
@adityachimte5728 2 года назад
i learn html and css in only 2days thanks a lot brooooo
@JLSXMK8
@JLSXMK8 2 года назад
You pretty much hit the nail on the head. Constants (in pretty much any language, not just C) can never be altered; This data type is extremely useful for when you want fixed int values; you provided a perfect example with "Pi" there. In Java, for instance, you may want to use a "double pi = 3.141592654357...", but if somebody changes the value, your program could go haywire altogether! Constants help to relieve this issue.
@flammabletfm3405
@flammabletfm3405 2 года назад
Wow.Two videos in the same time…Nice!
@vincenzo_graw
@vincenzo_graw 4 месяца назад
Bro, your videos helping me to move forward really fast!!
@ucheazubuike4125
@ucheazubuike4125 Год назад
IMO, this is by far the best channel to lear
@adityachimte5728
@adityachimte5728 2 года назад
love u broo....... big fan
@spartanranger
@spartanranger 2 года назад
Thanks for the video Bro.
@paolobena
@paolobena 8 месяцев назад
Great Video!
@jubewe
@jubewe 2 года назад
Cool Video again :)
@aditya_asundi
@aditya_asundi 2 года назад
Sick thumbnail
@user-lg9fx1tx8e
@user-lg9fx1tx8e Год назад
Awesome.
@hat8694
@hat8694 2 года назад
constants are useful!
@dhimitriosspaho1810
@dhimitriosspaho1810 Год назад
The best
@sayanta01
@sayanta01 3 месяца назад
thanks man
@user-mc9uv7ij7x
@user-mc9uv7ij7x Год назад
❤❤❤❤❤❤
@user-ace96plays
@user-ace96plays 2 месяца назад
DONE❤
@beglis2747
@beglis2747 2 года назад
Why wouldn't be 420.69 tho? 😥
@hamzabahtit8358
@hamzabahtit8358 Год назад
what about #define pi 3.14
Год назад
const variables have a specific data type, while #define can define anything as long as it's valid syntax. const variables are stored in memory, while #define is just a text replacement that occurs at compile-time. const variables can be scoped, just like any other variable, while #define applies globally unless you use conditional compilation.
@TheEnemiez
@TheEnemiez 2 года назад
What I understand: You cannot change constants. :)
@thestarheater973
@thestarheater973 Год назад
pi = 420.69 yessir
@randomdev4246
@randomdev4246 2 года назад
YOOO ALGORITHM BREAK POGGGG
@Mad-Ramx_Dev
@Mad-Ramx_Dev 3 месяца назад
Got it
@student1999
@student1999 9 месяцев назад
i like pie
@emirhansoy1423
@emirhansoy1423 2 года назад
bro
@bower19942
@bower19942 Год назад
comment below
@MerryMerry632
@MerryMerry632 9 месяцев назад
Pie
@Meirdom
@Meirdom Год назад
random comment
@kartikchauhan5209
@kartikchauhan5209 3 месяца назад
random comment down below
@fyrukmcoo100
@fyrukmcoo100 2 года назад
P
@Standbychampion1
@Standbychampion1 Месяц назад
Hdj
@seif7653
@seif7653 Год назад
random comment
Далее
C arithmetic operators ➗
3:32
Просмотров 25 тыс.
why do header files even exist?
10:53
Просмотров 381 тыс.
БАТЯ И ТЁЩА😂#shorts
00:58
Просмотров 4,4 млн
Fast and Furious: New Zealand 🚗
00:29
Просмотров 24 млн
The Algorithm Behind Spell Checkers
13:02
Просмотров 409 тыс.
A const int is not a constant.
9:16
Просмотров 66 тыс.
C++ vs Rust: which is faster?
21:15
Просмотров 384 тыс.
31 nooby C++ habits you need to ditch
16:18
Просмотров 752 тыс.
If __name__ == "__main__" for Python Developers
8:47
Просмотров 390 тыс.
Constants | C Programming Tutorial
9:15
Просмотров 6 тыс.
Defining Constants. Should I use CONST or #DEFINE?
7:59