C_07 Constants in C | Types of Constants | Programming in C
Вставка
- Опубліковано 18 гру 2020
- Discussed all the type of Constants in C language
Enrollment links:
CS/IT: bit.ly/34eWgCW
To get 10% discount use Invitation Code: JKL10
Unacademy is back with yet another exciting Test "GATE Challenge".
The challenge consists of 4 levels and consists of All the engineering Branches (Mech, Civil, Electrical, ECE, CS/IT, Chemical). The first 3, levels each are a set of 30 questions in 90 minutes to warm you up and get ready for the grand finale which will have 65 questions, to be solved, in 180 minutes. All the questions are designed and curated by the best faculties in Unacademy, just not this All India Ranking of the test would be provided if you give the test live.
Connect & Contact Me:
Facebook: / jennys-lectures-csit-n...
Quora: www.quora.com/profile/Jayanti...
Instagram: / jayantikhatrilamba
Twitter: / khatrijenny
See Complete Playlists:
Placement Series: • Placements Series
Data Structures and Algorithms: https: • Data Structures and Al...
Design and Analysis of Algorithms(DAA): • Design and Analysis of...
Dynamic Programming: • Dynamic Programming
Operating Systems: // • Operating Systems
DBMS: • DBMS (Database Managem...
Lecture starts from 2:27
2:35
Lecture is awesome but the letters on the white board is not clear due to the light effect
Yess we can't see clearly it
yes
Go to setting and select high picture quality
Yes
Clear only
Adding more to the information presented above:
When a variable is declared as const, it's stored in read-only section of a memory (.rodata segment). That's the reason when you try to modify the value of that variable, you will get an error: assignment of read only variable. Also, where const is placed also changes the meaning of the declaration. For eg.
1) const int a -> It means a is a constant integer
2) int const a -> Same as 1. It means a is a constant integer
3) const int *a -> Here a is a pointer to a constant integer
4) int * const a -> Here a is a constant pointer to a non-constant integer. The value of pointed integer is modifiable, but the pointer is not modifiable.
5) int const * a const -> Here a is a constant pointer to a const integer that means the value of the pointed integer and pointer both are not modifiable.
const qualifier always applies to what is present to it's immediate left. If nothing is on the left, then it applies to whatever is on the right.
The whole point of a const qualifier is to make sure you don't accidentally change value of the variable which is supposed to be constant. Though, value of constant integer can be changed through the use of pointers.
For eg.
const int a = 10; // Here a is a const integer which will not be modifiable
int *myPtr = &a; // Pointing to the constant variable
*myPtr = 20; // Changing the value of constant variable
Now if you print a, you will see value to be 20. The reason why this happens is because the pointer that is pointing to the const variable is a non-constant pointer. If you want to make sure not even a pointer should be able to change the value of a const variable then you should make the pointer a const too.
eg. int *const myPtr = &a;
This way your const stays safe.
Good Info!!
what if u declare a const as a local variable which segment it will be allocated
@@karthikmallyam851 In stack segment of memory
thank you very much
@@indianguy7868 thank you for your reply this was causing a issue in my project that was reading garbage value , and since its a constant compiler was optimising it , so i mentioned as volatile const now it’s working fine
NOTE :-
@10:50 '/0' Is not back slash zero . the correct one is '\0' .
These are still helpful in 2024 mam thank you soo much❤
I finally understood a concept that I was looking for since we start C in my college. Thanks a lot . You're the best.
No fear when Jenny mam is here 😁💜
Exactly
Yes 😁
Yess
Yes true
No words to explain your efforts and patience.Thank you so much mam.
Thank you so much mam,you are really blessed with knowledge,kudos
Ma'am really I have no words to say THANK YOU to you
your way of explaning is just amazing
Thank you sooo much............
One of the best teacher I have come up...Thanks alot
This video was very helpful. Thank you mam!
Mam I really appreciate your effort for uploading quality content video every day.
Integer is also part of real numbers in maths. U can say only float to non integer parts of a number.
Thank you for your efforts mam🔥🔥🔥🔥🔥🔥
May be iam the one who is watching in 2024 for diploma in cse😅
no no no
🤣
Here I'm
No I'm also
Where are you from
@@Ifeel_kingz India
Here I'm there for uh
We can also use small case character in define section it works.
Thank you ma'am.❤️❤️ . Ma'am please upload videos of function, pointer of c.
Thank you itne ache ache video banane ke li e. Me ne ye constants book me 10 padhe fir bhi Pata nahi chala aur aapka video ek bar dekhte hi samja aa gaya😀😀 . God bless you mam. Have a good life. And keep it up.
no words for ur appreciation.........just thanku for teaching us .
Thank you mam for explaining the every single topic,it is really helpful to understand.
Thnx mam for ds brilliant explanation 😊
Mam I love you as well as I heartly love your teaching 🙂. Thanks Mam🙏
When I was checked in compiler. It is correct.
I love you Jennyyyyyy.... I was taking the videos 10 per day. As a gym for my Alx SE program. Thank you Jenny.
Jayanthi Khatri Lamba to the world. I'm from Nigeria❤❤❤
Thank you very much mam for teaching us thoroughly 😊
Thanks a lot lot mam for teaching us
Thamks from your Hard Works
your teaching are very useful mam
yes mam you are right it is kept constant
I understood your constant in c so keep👍👍 your teaching mam
thank u mam for giving the best
mam you did really amazing worked . How you unfold complex things into simple
thank you so much mam❤❤❤
Thank you Ma'am
Getting error in the case of constant But getting error as redefinition for the below code in the case of not constant as well.
#include
int main()
{
int a = 10;
int a = 20;
printf("%d", a);
return 0;
}
But Your teaching method and explanation are awesome!!!
Nice explanation and simple
Your lectures are amazing, very detailed explanations of each and everything, Glad to watch till now.
At time stamp 19:28 - You have mentioned about some rules - Can advise where we can get those rules.
Thanks Mam for such an amazing explanation.
10:52 it is a forward slash single string constant mam.🌼🌷🌹
U lecture and u just mesemerizes❤❤
Special Characters (32-47 / 58-64 / 91-96 / 123-126)
Thanku so much mam
Just love it!
U r teaching good mam ❤️❤️❤️❤️❤️🔥🔥
#strlen function does not count \0 or null as the string length.. so if we measure the length of "abcd" strlen() function will return 4 as the string length not 5.
Watched and Understood ❤
I learn dsa from your playlist
Your amazing in this thing
hiii , Nicely explained
'/0' this one is wrong '\0' this is right but no one is human, only human makes mistakes. good job ma'am, i like your job
Excellent Teaching madam
Thanks mam
Thanks
thank you
Nicely explained🤓
Thank you maàm😊
Nice lecture maam and you also
Super osm class ma'am thank q ma'am i am bca student
thanks for sharing awesome explanation but video seems not clear/blur
examples are correct even when i entered ASCII values like 1000 , 1500 i got different notations. But it will upto 7 zeroes , afterthat when i enter 8 zero i got nothing.
Madam, this is a very useful video and I could collect more knowledge from this video .
Do we use the word STRING in C programming ? It should be character array,Am I?Please give me the answer
Please make video on python programming it would helpful for students
Complete the c programming in one class it will help us
150 parts are very tough
Plz make a video on priority quees
Mam your are right output is coming
Bro we are not getting output please say bro how can we get that
Thank you madam
very helpfull mam
Thankyou mam😊
Hii ma'am I have one doubt ma'am
As per my understanding the 'X' used here is to denote any number we can use inbetween.
If I am wrong please correct me...
Yeah I also agree with you
is const variables can rely on scope rules? if const keyword is applied to local variables the scope of the variable is local and if the const keyword is applied to a global variable the scope of a variable is global correct. where are global and local const variables stored in memory? if const variables are stored in .rodata but how the const variable can access through the memory of the variable we can access the .rodata?
Ty's mam
Mam based on your rules how to separate multiple
intiger values assigned to a variable
Mam please do python series it will be helpful for more students please mam.
Is all escape sequences are single character constant? can you explain me.
Great
I think there was few members watched this video... by already knowing this concept clearly😁😁..... Purpose is different😁😁😁😁😁❤
tq mam
I'm really surprised that these quality videos are for free, but then I have a question? Is really no class is taken by you for free.
Good 👍👍
Thanks for this wonderful tutorial Ma'am.
Please I have this question to ask about the examples you gave under the HEXADECIMAL CONSTANT.
You said 0X7G is invalid because the last character i.e, G is out of range of characters used in HEXADECIMAL (A-F) while 0x7F is correct.
Please what happens to the character "x" which is also not in the range of A-F?
Please I'll be very glad if you can make available pdf notes on this training. More power to your elbow.
I'm enjoying your service to humanity.
Bunch of thanks.
Bro the rule is that hexa decimals must begin with OX or Ox preceding them the alphabets should be from A-F
Mam X means you tell only we can use alphabets from A to F then what is meant by X
Same doubt..
0X or 0x just means the numeric constants are hexadecimal.
Here X is not a value.
If you teach all subjects then👌👌👌👌👌👌👌👌👌
I have question ma'am, under hexadecimal constant you said we can't use G but you used X which not part of the 0-9 and A-F...I need a clarity under that ma'am...Thank You always ma'am.
i love you, you are amazing
Nice class mam
Happy teachers day mam
ok done !
Nice
What is ox mam ur saying hexa decimal constant?
Mam can you please tell me that why are you using X and x in hexadecimal constants....as you told that there are 0-15 characters in hexadecimal constants...and we write these 0-9 and A=10, B=11, C =12, D=13, E= 14, F=15....so where is the use of X and x alphabets?
Its just a dummy value fr sake of explaination as we do in maths
Wow!!
Mam Cyber security course tell me, once Modules wise tell me, u r teaching explanation excellent 👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌.
U r not only beautiful but nice lecturing u do!
You said we shouldn't use G in hexaoctal decimal but why we are using X in that mam
This is the prefix
Mam then we should not write x also mam if we don't want to write G here at 7.20
Jenny Ma'am fall in love with this nonworking MARKER even it is not performing 😆😆😆😆😆
😂
@@JennyslecturesCSIT mam kindly request u to use new pen can't visible mam. Plzz mam. Hope this message reaches you mam
Mam you are explaining good,
But please can you write little bit bright we can't see some letters..
Hello mam! What a fabulous explaination . On which book i get such details??
It's experience....it will not be in any book
Jaya mam in 7:25 OX74 u said hexadecimal number but in hexadecimal number comes only 0-9 and A to F.how I can not understand...
Mam i m highly thank full to you for making such highly valuable videos for us which are also free for us
0-9 are decimal numbers and (0-9-A-F) are hexadecimal numbers