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

28 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

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

Professional Course 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

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

Data Scientist Course in Dombivli 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...

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

ufascr.v4 said...

ufa168

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

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

Kaylee Brown said...

The specialty of these programmers helping you in completing the assignment is that they write down clean codes that can be easily read and executed. Being an expert in their field, they put on their learning in your assignment to write down working codes for your assignment. Moreover, they are not only limited to completing assignments, as they can also assist you in completing your programming homework, thesis work, and projects as well.

Based on the above reasons, it can be considered smart to go to a programming help to get your assignments done if you are not confident enough with your programming skills.

Nathan said...

Very useful article to read and Information was helpful. I would like to thank you for the efforts you had made for writing this awesome article.
Data Analytics Course

Professional Course said...

I have read your article, it is very informative and useful to me, I admire the valuable information you offer in your articles. Thanks for posting it ...

Business Analytics Course in Patna

BASANT KUMAR said...

factorial hundred In the last few days, the “factorial of 100” is one of the top subjects and a lot of maths geeks compute it using voice assistants such as Alexa, Shiri, etc.

factorial hundred In the last few days, the “factorial of 100” is one of the top subjects and a lot of maths geeks compute it using voice assistants such as Alexa, Shiri, etc.


factorial hundred In the last few days, the “factorial of 100” is one of the top subjects and a lot of maths geeks compute it using voice assistants such as Alexa, Shiri, etc.


johnhardy said...

This informative article is very helpful and useful. You done very nice work in this article. I hope you will share kore updates. Now it's time to avail Locksmith Leeds for more information.

Essien said...

This is a very useful update. I was looking for a place to actually commit my intellectual knowledge. I think I reached one today. Thank you for your effort in sharing. yobe state university pre-degree admission form