Pointers to pointers in c programming language

C pointers to pointers: A pointer is pointing to another pointers is called pointers to pointer.


Examples of pointers to pointers in c:


What will be output if you will execute following code?


#include<stdio.h>

int main(){

int s=2,*r=&s,**q=&r,***p=&q;

printf("%d",p[0][0][0]);
return 0;

}


Output: 2

Explanation:


As we know p[i] =*(p+i)

So,

P[0][0][0]=*(p[0][0]+0)=**p[0]=***p

Another rule is: *&i=i

So,

***p=*** (&q) =**q=** (&r) =*r=*(&s) =s=2

32 comments:

Sophia Right said...

A great post without doubt. The information shared is of top quality which has to get appreciated at all levels.

Manmeet Kaur said...

This comment has been removed by the author.

Unknown said...

Superb

Unknown said...

Superb

Mod Go said...

1movies

d said...

Download Archery Master 3D Mod Apk

Emerging Technologies said...

I need to thank you for this very good read and i have bookmarked to check out new things from your post. Thank you very much for sharing such a useful article and will definitely saved and revisit your site.
Data Science Course

Data Analytics Course said...

Excellent Blog! I would like to thank you for the efforts you have made in writing this post. Gained lots of knowledge.
Data Analytics Course

Data Science Courses said...

Awesome article. I enjoyed reading your articles. this can be really a good scan for me. wanting forward to reading new articles. maintain the nice work!
Data Science Courses in Bangalore

AI Courses said...

What an incredible message this is. Truly one of the best posts I have ever seen in my life. Wow, keep it up.
AI Courses in Bangalore

Business Analytics said...

I am sure it will help many people. Keep up the good work. It's very compelling and I enjoyed browsing the entire blog.
Business Analytics Course in Bangalore

Education said...

Your site is truly cool and this is an extraordinary moving article and If it's not too much trouble share more like that. Thank You..
Digital Marketing Course in Hyderabad

Knowledge said...

Thank a lot. You have done excellent job. I enjoyed your blog . Nice efforts
Data Science Certification in Hyderabad

Institute said...

Wow, happy to see this awesome post. I hope this think help any newbie for their awesome work and by the way thanks for share this awesomeness, i thought this was a pretty interesting read when it comes to this topic. Thank you..
Artificial Intelligence Course

Data Science Training in Bangalore said...

I bookmarked your website because this site contains valuable information. I am very satisfied with the quality and the presentation of the articles. Thank you so much for saving great things. I am very grateful for this site.

Data Science Training in Bangalore

Digital Marketing Training in Bangalore said...

Wonderful blog found to be very impressive to come across such an awesome blog. I should really appreciate the blogger for the efforts they have put in to develop such amazing content for all the curious readers who are very keen on being updated across every corner. Ultimately, this is an awesome experience for the readers. Anyways, thanks a lot and keep sharing the content in the future too.

Digital Marketing Training in Bangalore

Artificial Intelligence Training in Bangalore said...

I wanted to leave a little comment to support you and wish you the best of luck. We wish you the best of luck in all of your blogging endeavors.

Artificial Intelligence Training in Bangalore

Machine Learning Course in Bangalore said...

You actually make it seem like it's really easy with your acting, but I think it's something I think I would never understand. I find that too complicated and extremely broad. I look forward to your next message. I'll try to figure it out!

Machine Learning Course in Bangalore

cloud computing course in bangalore said...

Extremely overall quite fascinating post. I was searching for this sort of data and delighted in perusing this one. Continue posting. A debt of gratitude is in order for sharing. data scientist course in delhi

data science said...


I was basically inspecting through the web filtering for certain data and ran over your blog. I am flabbergasted by the data that you have on this blog. It shows how well you welcome this subject. Bookmarked this page, will return for extra. data science course in jaipur

ufascr.v4 said...

ufa168 A football betting website that has been accepted by bet2you people all over the world. No minimum deposit-withdrawal Bet starting from only 10 baht ufabet

ufascr.v4 said...

hank you for very usefull information ufabet

ufascr.v4 said...

เป็นเว็บหวยออนไลน์ที่ได้รับความนิยมเอามากๆ ด้วยการที่เราเป็นเว็บ Ruay จึงทำให้เพื่อนๆสามารถเข้าใกล้และสัมผัสกับความรวยที่แท้จริง ไม่ว่าจะเป็นทางอินเตอร์เน็ตหรือแบบออฟไลน์ก็ยังดี แถมอย่างที่หลายๆคนทราบว่าคนไทยชอบเล่นหวยเป็นประจำ ดังนั้นทางเราเว็บ Ruay จึงเกิดมาเพื่อตอบโจทย์ความต้องการสำหรับคอหวยที่แท้จริง แถมเรายังมีบริการแทงหวยฟรี เป็นอีกทางเลือกสำหรับคนที่อยากลองเล่น ด้วยมีการบริการหลากหลายรูปแบบ จึงไม่แปลกเลยที่เว็บ RUAY จะสามารถสร้างรายได้ให้กับผู้ที่มาเล่นหวยออนไลน์ เพื่อนๆสามารถสมัครสมาชิก RUAY ได้ฟรีโดยไม่มีค่าใช้จ่าย และถ้าหากเพื่อนๆมีเลขเด็ด เลขดัง ก็สามารถนำมาสร้างผลกำไรและลงทุนกับหวยต่างๆในเว็บของเรา RUAY ได้อย่างง่ายดาย เป็นอีกทางเลือกที่จะช่วยเพื่อนๆได้ แถมเว็บเรายังมีประสิทธิภาพภาพและมีการเติบโตมากที่สุดในบรรดาเว็บแทงหวยอีกด้วย และทีมงานของเราพร้อมเปิดกว้างต้อนรับสมาชิกจากทั่วโลก จึงรับประกันได้เลยว่า RUAY ของเรามีความมั่นคงเอามากๆ

ufascr.v4 said...

UFABET เว็บพนันออนไลน์ 2021 แทงบอล บาคาร่า UFA สล็อต ฝาก

ufascr.v4 said...

ufa168

Bhuvankumar said...

I feel very grateful that I read this. It is very helpful and very informative and I really learned a lot from it.
Data Analytics Course

Tech Institute said...

I am really enjoying reading your well written articles. I am looking forward to reading new articles. Keep up the good work.
Data Science Courses in Bangalore

kumal kumar said...

What an incredible message this is. Truly one of the best posts I have ever seen in my life. Wow, keep it up.
AI Courses in Bangalore

Dev Kumar said...

I am sure it will help many people. Keep up the good work. It's very compelling and I enjoyed browsing the entire blog.
Business Analytics Course in Bangalore

ufascr.v4 said...

bet2you

UFABET

ib888

ufa369

ufa356

fafa191

Unknown said...

Thanks for posting the best information and the blog is very helpful.

Artificial Intelligence Training in Bangalore | Artificial Intelligence Online Training

Python Training in Bangalore | Python Online Training

Data Science Training in Bangalore | Data Science Online Training

Machine Learning Training in Bangalore | Machine Learning Online Training

AWS Training in bangalore | AWS Online Training

UiPath Training in Bangalore | UiPath Online Training

Professional Course said...

You have completed certain reliable points there. I did some research on the subject and found that almost everyone will agree with your blog.

Artificial Intelligence Training in Bangalore