Pointers in golang
Link to my programming Video Library:
https://courses.LearnCodeOnline.in/learn
Pick best UI color for your projects:
https://UIColorPicker.com
Desktop: https://amzn.to/2GZ0C46
Laptop that I use: https://amzn.to/2Goui9Q
Wallpaper: https://imgur.com/a/FYHfk
Facebook: https://www.facebook.com/HiteshChoudharyPage
Instagram: https://instagram.com/hiteshchoudharyofficial
homepage: http://www.hiteshChoudhary.com
Download LearnCodeOnline.in app from Google play store and Apple App store
https://play.google.com/store/apps/details?id=in.learncodeonline.lco
Disclaimer:
It doesn’t feel good to have a disclaimer in every video but this is how the world is right now.
All videos are for educational purpose and use them wisely. Any video may have a slight mistake, please take decisions based on your research. This video is not forcing anything on you.
All Amazon links are affiliate links (If any).
Thanks for the clear explanation
Summary:
func main() {
fmt.Println("Pointers")
a := 10
fmt.Println("Value of 'a': ", a)
fmt.Printf("Type of 'a': %T", a)
b := &a
fmt.Println("Value of 'b': ", b)
fmt.Println("Value of the variable whose address is stored at b: ", *b)
fmt.Printf("Type of 'b': %T", b)
}
Output:
Pointers
Value of 'a': 10
Type of 'a': intValue of 'b': 0xc00000e0c0
Value of the variable whose address is stored at b: 10
Type of 'b': *int
Question:
Why is the Type of 'b', asterisk int?
could you please share these tutorial files ? If you've this somewhere may be on Git ?
Thanks !
Nice explanation, also interesting color theme 🙂
Sir can u please make a video on interface in golang
Piece of cake for a C/C++ programmer 😂
Good 👍
It works like shallow copy and deep copy in python
Says that pointers are usually overexplained and then goes ahead and overexplains it 😂
9:18 *p *= 2 would've been even more crazy . 😀
sir which vs code theme your are using?
Thanks a lot very good explanation)
Put simply, learnt in C and stands true also for Go
&a means memory address of a.
var b= &a
* b means value at memory address of a.
Awesome video !!
You made it so easy✨💯 Thank you🙏
Sir please make video golang with dynamo db and redis please 🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
Very good explanation!
It would be nice to show also an example to use pointer and reference with function usage. like calling a function which getting an argument by pointer.
Anyway, Thanks a lot !!!
Thanks sir
The best pointer explanation
Oh my pointers!
fall in love with POINTERS
Thanks, sir.
wow, this is similar to C pointers.
55 likes and 0 dislike
Too much similarities with 'C'
I checked the type of reference object , to know everything works and it says it has the type of "*int" , which is a pointer!
Plz make a video on open ai codex
First 😂