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.
@@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
if you are following lecture try to run following code in online compiler or in vs code #include int main() { printf("%d",'a'); printf(" "); printf("%c",97); return 0; }
00:00 The video discusses constants in the C programming language. 02:18 Constants in C programming can have fixed values that are not changed throughout the program. 04:53 Integers can be expressed in three forms: decimal, octal, and hexadecimal. 07:47 Numeric constants can be represented as integer constants or real constants. 10:29 Character constants can store single characters enclosed in single quotes. 13:06 Explanation of format specifiers and character constants in C 15:44 Constants in the program can be declared using the 'const' keyword 18:03 Constants can be declared using the 'const' keyword thanks is advance 😜😜
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 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.
Maybe me the only student who worked and resigned and get back to education again to clear errors and mam your efforts really impressive and i cleared my DAA with your classes to hope i may clear C now tq for your knowledge mam 😊
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!!!
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.
#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.
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.
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
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.
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.
Mam Cyber security course tell me, once Modules wise tell me, u r teaching explanation excellent 👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌.
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?
These are still helpful in 2024 mam thank you soo much❤
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
2 saal mauj kiye, ab 3rd year mein aake c padh rahe hain, but mam ne concepts badhiya clear kar diye abhi tak... Lots of love ❤❤❤
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
Lecture starts from 2:27
2:35
@@shortperday 😂🤣
I finally understood a concept that I was looking for since we start C in my college. Thanks a lot . You're the best.
Do you have the notes of all these lecture??
NOTE :-
@10:50 '/0' Is not back slash zero . the correct one is '\0' .
@@yashmishra9603 do you have the notes of all these lecture??
@@bluearmy6281 nope
@@yashmishra9603 so how will you remember all that things in your mind !
if you are following lecture try to run following code in online compiler or in vs code
#include
int main()
{
printf("%d",'a');
printf("
");
printf("%c",97);
return 0;
}
ASCII value h na.....
%d for numeric
%c for charcater
output : 97
a
00:00 The video discusses constants in the C programming language.
02:18 Constants in C programming can have fixed values that are not changed throughout the program.
04:53 Integers can be expressed in three forms: decimal, octal, and hexadecimal.
07:47 Numeric constants can be represented as integer constants or real constants.
10:29 Character constants can store single characters enclosed in single quotes.
13:06 Explanation of format specifiers and character constants in C
15:44 Constants in the program can be declared using the 'const' keyword
18:03 Constants can be declared using the 'const' keyword
thanks is advance 😜😜
@@shadan_alam. Day 1 of learning
Really helpful!!!!!
No fear when Jenny mam is here 😁💜
Exactly
Yes 😁
Yess
Yes true
Do you have the notes of all these lecture
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❤❤❤
No words to explain your efforts and patience.Thank you so much mam.
Do you have the notes of all these lecture?? 😊
Mam I really appreciate your effort for uploading quality content video every day.
Ma'am really I have no words to say THANK YOU to you
your way of explaning is just amazing
Thank you sooo much............
Thank you so much mam,you are really blessed with knowledge,kudos
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
@@i.t.s_nextion India
Here I'm there for uh
One of the best teacher I have come up...Thanks alot
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.
10:52 it is a forward slash single string constant mam.🌼🌷🌹
Maybe me the only student who worked and resigned and get back to education again to clear errors and mam your efforts really impressive and i cleared my DAA with your classes to hope i may clear C now tq for your knowledge mam 😊
Mam I love you as well as I heartly love your teaching 🙂. Thanks Mam🙏
When I was checked in compiler. It is correct.
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!!!
Thank you ma'am.❤️❤️ . Ma'am please upload videos of function, pointer of c.
Special Characters (32-47 / 58-64 / 91-96 / 123-126)
mam you did really amazing worked . How you unfold complex things into simple
thank you so much mam❤❤❤
Do you have the notes of all these lecture??
I understood your constant in c so keep👍👍 your teaching mam
Thank you for your efforts mam🔥🔥🔥🔥🔥🔥
Thank you mam for explaining the every single topic,it is really helpful to understand.
Do you have the notes of all these lecture
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.
Do you have the notes of all these lecture??
This video was very helpful. Thank you mam!
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
Integer is also part of real numbers in maths. U can say only float to non integer parts of a number.
U lecture and u just mesemerizes❤❤
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
If you teach all subjects then👌👌👌👌👌👌👌👌👌
Complete the c programming in one class it will help us
150 parts are very tough
Mam based on your rules how to separate multiple
intiger values assigned to a variable
I think there was few members watched this video... by already knowing this concept clearly😁😁..... Purpose is different😁😁😁😁😁❤
Mam your are right output is coming
Bro we are not getting output please say bro how can we get that
😍 Jenny my love 😍 new crush introduced
I never commented in UA-cam till now
This is my first comment
I love you 💙💙
Watched and Understood ❤
no words for ur appreciation.........just thanku for teaching us .
Do you have the notes of all these lecture?
Good teaching mam
Super osm class ma'am thank q ma'am i am bca student
Thamks from your Hard Works
I love you💕💕
Your amazing in this thing
Thnx mam for ds brilliant explanation 😊
Do you have the notes of all these lecture?
Mam ,I have a doubt.At 4:20 Why isn't 05 a valid constant, doesn't it come under the octal category? So why don't we consider it valid?
so beautiful so eligent just looking like a wow😀😇🥰😋
Mam you are explaining good,
But please can you write little bit bright we can't see some letters..
Nice lecture maam and you also
your teaching are very useful mam
Do you have the notes of all these lecture?
Good 👍👍
U r teaching good mam ❤️❤️❤️❤️❤️🔥🔥
Do you have the notes of all these lecture
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
Thank you Ma'am
Nicely explained🤓
#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.
@@boniamin4756 yes it's length is four but she mentions the memory stored is 5 because of null terminator.
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
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
Nice explanation and simple
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
Happy teachers day mam
Great
We can also use small case character in define section it works.
thank u mam for giving the best
Thank u soo much ma'am your vedios is awesome
But ager exam se pehle milajti to or achha hota 😢
Thankyou mam😊
2:26 lec starts
Are mam ,suniye am here for only see u🤣😂 without any reason 🤦cozz big fan yar😎❤️
yes mam you are right it is kept constant
Thanks a lot lot mam for teaching us
Hello mam! What a fabulous explaination . On which book i get such details??
It's experience....it will not be in any book
I love u mam❤️😘
Thank you maàm😊
I learn dsa from your playlist
i love you, you are amazing
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.
very helpfull mam
What happens when you do arithmetic operations on characters.
Where all you can define a no.
Is a defined number constant?
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.
Thanku so much mam
Hii ma'am I have one doubt ma'am
@@abbaraboinavinay3067 what
Nice class mam
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.
Just love it!
Eye is so beautiful 👊👊
thank you
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.
Mam Cyber security course tell me, once Modules wise tell me, u r teaching explanation excellent 👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌👌.
Thanks Mam for such an amazing explanation.
Do you have the notes of all these lecture?
Mam you really awesome but lightening is very high...pls adjust light
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
You said we shouldn't use G in hexaoctal decimal but why we are using X in that mam
This is the prefix
Please use a darker ink Marker..
Board not visible clearly 🙏
Thanks