Declaring & Initializing Pointers in C
Вставка
- Опубліковано 1 кві 2019
- C Programming: Declaring & Initializing Pointers in C
Topics discussed:
1) Declaration of the pointer variable.
2) Initialization of pointer variable.
3) Address of operator.
C Programming Lectures: goo.gl/7Eh2SS
Follow Neso Academy on Instagram: @nesoacademy(bit.ly/2XP63OE)
Follow me on Instagram: @jaspreetedu(bit.ly/2YX26E5)
Contribute: www.nesoacademy.org/donate
Memberships: bit.ly/2U7YSPI
Books: www.nesoacademy.org/recommende...
Website ► www.nesoacademy.org/
Forum ► forum.nesoacademy.org/
Facebook ► goo.gl/Nt0PmB
Twitter ► / nesoacademy
Music:
Axol x Alex Skrindo - You [NCS Release]
#CProgrammingByNeso #CProgramming #Pointers #PointerDeclaration #PointersInC
These are literally one of the the best lectures I ever attended in my life!!
This is the video that finally made me understood what are pointers and how to use it. At 2:30 when you explained that the ampersand means 'ADDRESS OF operator', that really clear things up. It's the little explanation like this that makes the difference between a good teacher and an average one.
A lot of other "teachers" should check out this lesson to see how to actually teach a concept that one can use afterwards and not just understand temporarily and in the context of that particular video. Thank you!
Time and time again you have the best tutorials on UA-cam. Thank you so much!
How can i like your video multiple times?
by commenting
By making more and more fake gmail id😂😂
tokisussa bambi
Like & then dislike & again like and repeat the process.....
use for loop
I could not understand the concept of pointers during class for the life of me. Saw this video and the concept just clicked in my head. Thank you for the upload!
CS50?
@@joshscores3360 Negative ghost rider, its a 4000s number course at my school.
@@TigerHasGame the pointers lesson was probably the first time Professor Malan had admitted something was really confusing, so it made me freak out a little.
You really helped simplified this concept. I have been struggling with pointers
Mind blowing explanation sir,heads up. I see many lectures on pointer s but not get it well.After listening to your , I m very much clear.
Excellent explanations. Thank you.
Best videos ever, nice work and thanks for helping us.
Litreally awsome and calm teaching👏
Finally a short, concise explanation that is straight to the point and using clear terms!
Thanks for the great content, just subscribed.
Your teaching skills are too good
Make videos on c++,your lectures are amazing
Holy fuck dude! Your channel is fucking amazing! You able to explain concepts with such simplicity and effectiveness as well. One thing that helps a lot are the animations and just the visual styling in general. My teachers only use their hands and raw code to teach us. Thank you so much for your videos! Keep up the good work!!!
Neso Academy taught me what I can"t understand to what my Prof taught
I'll complain to your professor
Woow, fantastic !, excellent explanation of such a simple concept .. Thanking you ! .. :)
love you sir ! ........you are awesome .
ty
waiting for next lecture
Please continue such lectures
Outstanding sir
phenomenal
My favt channel is neso academy..our presentation is fabulous sir
In my rating, Neso Academy is the best! I have not even met a prof. who teaches as best as these guys.
Thanks bro
Awesome explanation wow
Thank you so much
Very good Video!
Thank you, sir.
thank you sir
man, you are loud and clear. 🤩 🤩 🤩 🤩
Thanks a lot
I wish I had then when I was in school, but it's still helpful later as reference.
Super helpful❤
thank you bruh you're a GOD
Thanks man.
thanks man
thank you friend
good explaining
thanks
Can you please share the notes of all lectures?
Perfect !!!!
Got it❤
Addict in programming coz of neso
صلوا على الحبيب المصطفى صلى الله عليه وسلم.-
Great explanation....I am watching the entire series from function...
3:45
I'm confused on left sir u have wrote ptr = &x; and on right it's *ptr = &s; how??
Yeah 🤣
Hey there! let me give you an example using just integers: so assuming you know that integers can be declared as int a,b,c; instead of int a; int b; int c; and next we also know that it can be initialized as int a=2,b=3,c=4; instead of int a=2; int a=3; int c=4; so here we can do the same thing with the pointers we can declare and initialized at the same time so we code it as int x=5,*ptr=&x; instead of int x=5; int *ptr; ptr = &x; (please remember a pointer is also a variable but instead stores the address of another variable.) Hope you understood. Happy learning! :)
Han woh sir thoda galat kar diyen hain I guess
Yeah, I didn't get this point?
Can anyone please explain this to me.
@@vudhanthineeraja1904that's not our doubt if *ptr points out to the object of the data stored in ptr, then Assigning &x to the pointer ptr would just change the value of the variable to its address itself. Wait I explain it with an example , x=100 and &x = 1000 , ptr = &x means ptr stores the address of x and it is 1000 and *ptr = 100 means it would store the value found in the address mentioned in ptr and so *ptr = &x would mean, we are assigning the address of that x itself ( 1000) to the pointer which is not making any sense
Basicaly it points to the SPACE of memory that another var is occupying, and NOT to the var value itself.
Where is D.T.F.S. representation of periodic signals in signals and systems
3:31 Cool :D Never thought of that xD
it works, but readability is reduced
Power systems kab suru karooge sir........
I am waiting for ur reply and lecture
Can pointers change the value of constant variable ??
If we give the address of constant variable to a pointer.
No because the pointer stores the address of variable in the memory location not the values.
@@sukhbeersingh5811 thanks sir
Sir, I am confused at 3:38 you wrote ptr=&x , so how on can you also write *ptr=&x. Shouldn't *ptr=x be correct?
1:30...last point...
No because the pointer stores the address of variable x and to refer the address we use &(ampersand) before x.
ptr= name of a space in the memory
And every space in memory has an address and a value stored in it ( it could be garbage value too)
*ptr => ptr is a pointer variable
*ptr =value stored at the place names "ptr"
What are we storing in this space?
The address of x! And in our language it is expressed as &x
So store &x in the space named "ptr"
*ptr=&x
@@iamjust1normalgirlfromindi446 ok but there is albo ptr=&x (without the star)
@@iamjust1normalgirlfromindi446 ok so did he forgot to put a * beside ptr at 2:38 ?
Network theory classes sir
I thank god every day for random Indian guys on youtube
omg thank you it was useful
iqra University 😍
sir i think we can,t write *ptr=&x,int *ptr=&x should be right
He has written int x = 5, *ptr = &x
Int is applied to *ptr automatically
Are you guys developing a spaceship to go to neptune yet... Since u have been on this topic for a year??
Yo actually *ptr =&x shows error it's either ptr=&x or *ptr=x
Can you add subtitle for each lecture? My English is not good
This is the whole syllabus of Data Structures?
C and DS...
Sir English to Telugu cheppavachu kadha...?
When the friendly youtube tutorial helps more then real education
How to point the addresse of pointer variable?
You can create a pointer to another pointer, so called double-pointer.
By using ("%p",pointer variable)
Sir,
What is base address meaning ??
The 1st address or starting index address like ex: array[0] has address 1000.
* is called as asteric symbol
*Ty*
How much storage space required for the pointer to store the address of another variable....?
Depends, but it is usually 4 bytes, which is 32 bits.
please add subtitle pls :(
Hi
Pointer is very useful. It is around two operators: memory address (&) and memory access (*)
𝔸𝕞𝕒𝕫𝕚𝕟𝕘 𝕖𝕩𝕡𝕝𝕒𝕟𝕒𝕥𝕚𝕠𝕟 🥰🥰🥰🥰🥰🥰🥰🥰🥰
🙇♂️❤️🇵🇭
I am Back
#include
int main()
{
int x = 5;
printf("the value of x = %d
", x);
printf("the address of x = %p
", &x);
printf("--------------------------------
");
int *ptr;
ptr = &x;
printf("the value of the pointer ptr = %p
", ptr);
printf("The Address of X is Equal to the value of the pointer ptr
");
printf("(&x) : = (ptr value)
", &x, ptr);
printf("the address of the pointer ptr = %p
", &ptr);
}
Output :
""
the value of x = 5
the address of x = 011ffabc
--------------------------------
the value of the pointer ptr = 011ffabc
The Address of X is Equal to the value of the pointer ptr
(&x) : = (ptr value)
the address of the pointer ptr = 011ffab8
""