Submit Search
Upload
Pointers in c languages
•
0 likes
•
174 views
milad ahmadi
Follow
simple description in pointers presentation . language of text is farsi
Read less
Read more
Science
Report
Share
Report
Share
1 of 2
Download now
Download to read offline
Recommended
Flyer - Peter Oto
Flyer - Peter Oto
Tamaki
ΑΟΘ - Επαναληπτικό διαγώνισμα σε 1-2-3 (το μισό)
ΑΟΘ - Επαναληπτικό διαγώνισμα σε 1-2-3 (το μισό)
Billonious
31-P NMR SPECTROSCOPY
31-P NMR SPECTROSCOPY
AIOU, ISLAMABAD
resume
resume
milad ahmadi
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
Recommended
Flyer - Peter Oto
Flyer - Peter Oto
Tamaki
ΑΟΘ - Επαναληπτικό διαγώνισμα σε 1-2-3 (το μισό)
ΑΟΘ - Επαναληπτικό διαγώνισμα σε 1-2-3 (το μισό)
Billonious
31-P NMR SPECTROSCOPY
31-P NMR SPECTROSCOPY
AIOU, ISLAMABAD
resume
resume
milad ahmadi
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
ChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
More Related Content
Featured
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
ChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
Featured
(20)
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
ChatGPT webinar slides
ChatGPT webinar slides
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Pointers in c languages
1.
ﺁﻣﻮزشC++-درس٨:ﮔﺮهﺎ اﺷﺎرﻩ ﺑﺮ
ای ﻣﻘﺪﻣﻪ http://www.persian-designers.com ﺁﻣﻮزشC++-درس٨:ﮔﺮهﺎ اﺷﺎرﻩ ﺑﺮ ای ﻣﻘﺪﻣﻪ در ﮔﺮهﺎ اﺷﺎرﻩCوC++دارﻧـﺪ ﻣـﯽ ﻧﮕـﻪ ﺧﻮد در را ﺁدرﺱﻬﺎ ﮐﻪ هﺴﺘﻨﺪ ﻣﺘﻐﻴﺮهﺎﯾﯽ.ﺁﻧﻬـﺎﺑﻴـﺸﺘﺮی ﻗـﺪرتراﺑﺮﻧﺎﻣـﻪ ﺑـﺮای ﻧﻮﯾﺲﮐﻨﻨﺪ ﻣﯽ ﻓﺮاهﻢﻧﻮﯾﺴﯽ ﺑﺮﻧﺎﻣﻪ زﺑﺎﻧﻬﺎی از ﺑﺴﻴﺎری در ﮐﻪ روﺷﻬﺎﯾﯽ از ﺁﻧﻬﺎ ﺗﻐﻴﻴﺮ و هﺎ دادﻩ ﺑﻪ دﺱﺘﺮﺱﯽ در او ﺑﻪ و ﮐﻨﻨﺪ ﻣﯽ ﮐﻤﮏ ،ﺷﻮد ﻧﻤﯽ دﯾﺪﻩ دﯾﮕﺮ.هﻤﭽﻨﻴﻦﺁﻧﻬﺎﻣﯽ اﺟﺎزﻩ ﮐﻪ ﺻﻮرﺗﯽ ﺑﻪ هﺴﺘﻨﺪ ﻣﻔﻴﺪ ﺗﻮاﺑﻊ ﺑﻪ ﭘﺎراﻣﺘﺮهﺎ ارﺱﺎل ﺑﺮای دادﻩ اﻧﺠﺎم را ﻻزم ﺗﻐﻴﻴﺮات ﺗﺎﺑﻊ ﯾﮏ دهﺪدهﺪ ﺑﺮﮔﺸﺖ ﻓﺮاﺧﻮاﻧﻨﺪﻩ روال ﺑﻪ را ﻣﻘﺎدﯾﺮ و.ﻧﺎدرﺱـﺖ ﺑـﺼﻮرت ﺁﻧﻬـﺎ از ﮐـﻪ وﻗﺘـﯽ ﻣﻨﺒﻊ ،ﺷﻮد اﺱﺘﻔﺎدﻩاﺷﮑﺎﻻ و ﺑﺮﻧﺎﻣﻪ ﺧﻄﺎهﺎیﺑﻮد ﺧﻮاهﻨﺪ ﻧﻮﯾﺲ ﺑﺮﻧﺎﻣﻪ ت. ﻣﻘﺪﻣﻪ: ﻣﻨﺡﺼﺮﺑﻔﺮد ﻣﺡﻞ ﯾﺎ ﺁدرس ﯾﮏ ﺁﻧﻬﺎ از ﮐﺪام هﺮ ،اﻧﺪ ﺷﺪﻩ ذﺧﻴﺮﻩ ﺡﺎﻓﻈﻪ در ﻣﺘﻐﻴﺮهﺎ هﻤﻪ ،ﺑﺎﺷﺪ ﺷﺪﻩ اﺟﺰا ﺑﺮﻧﺎﻣﻪ ﯾﮏ وﻗﺘﯽ دارﻧﺪ.اﺱﺖ دادﻩ ﻣﻘﺎدﯾﺮ ﺡﺎوی ﺁن ﺑﻪ ﻣﺮﺑﻮط ﺡﺎﻓﻈﻪ ﺁدرس و ﻣﺘﻐﻴﺮ ﯾﮏ ﻋﻤﻮﻣﺎ.زﯾﺮ ﺑﺼﻮرت ﻣﺘﻐﻴﺮ ﯾﮏ ﺷﻤﺎ وﻗﺘﯽ ،ﻣﺜﺎل ﺑﺮای ﺗﻉﺮﯾﻒﮐﻨﻴﺪ ﻣﯽ: int count = 5; ﻣﻘﺪار٥ﻣﺘﻐﻴﺮ از اﺱﺘﻔﺎدﻩ ﺑﺎ و اﺱﺖ ﺷﺪﻩ ذﺧﻴﺮﻩ ﺡﺎﻓﻈﻪ درcountاﺱـﺖ دﺱﺘﺮﺱﯽ ﻗﺎﺑﻞ.از ﺧﺎﺻـﯽ ﻧـﻮع ﮔـﺮ اﺷـﺎرﻩ ﯾـﮏ ﮐﻪ اﺱﺖ ﻣﺘﻐﻴﺮدادﻩ ﻣﻘﺪار ﺟﺎی ﺑﻪﺁدرس ﺡﺎویاﺱﺖ ﺡﺎﻓﻈﻪ.ﺗﻐﻴﻴﺮ را ﺁن ﻣﻉﻤﻮﻟﯽ ﻣﺘﻐﻴﺮ از اﺱﺘﻔﺎدﻩ زﻣﺎن در ﮐﻪ هﻤﺎﻧﻄﻮر ذﺧ ﺁدرس ﻣﻘﺪار ،هﻴﺪ ﻣﯽﮐﻨـﺪ ﻣـﯽ ﺗﻐﻴﻴـﺮ ﮔـﺮ اﺷﺎرﻩ ﻣﺘﻐﻴﺮ دﺱﺘﮑﺎری ﺑﺎ ﮔﺮ اﺷﺎرﻩ ﯾﮏ در ﺷﺪﻩ ﻴﺮﻩ.ذﺧﻴـﺮﻩ ﺁدرس ﻣﻉﻤـﻮﻻ اﺱﺖ دﯾﮕﺮ ﻣﺘﻐﻴﺮهﺎی ﺁدرس ،ﮔﺮ اﺷﺎرﻩ ﯾﮏ در ﺷﺪﻩ. ﺑﻪ ﮔﺮ اﺷﺎرﻩ ﯾﮏ ﺗﻉﺮﯾﻒint: int *ptr; ذﺧﻴﺮﻩﺁﻣﺘﻐﻴﺮ درسcountﮔﺮ اﺷﺎرﻩ درptr: ptr = &count; ﯾﮕﺎﻧﯽ ﻋﻤﻠﮕﺮ&ﮔﺮد ﻣﯽ ﺑﺮ را ﻣﺘﻐﻴﺮ ﯾﮏ ﺁدرساﻧﺪ اﺱﺖ ﺷﺪﻩ ذﺧﻴﺮﻩ ﮔﺮ اﺷﺎرﻩ در ﮐﻪ ﺡﺎﻓﻈﻪ از ﻣﺡﻠﯽ در ﻣﻮﺟﻮد ﻣﻘﺪار ﺁوردن ﺑﺪﺱﺖ ﺑﺮای،ﺑﻪ ﻧﻴﺎزﻋﻤﻞ"ﻣﺮﺟـﻊ ﺑﺎزﮔﺮداﻧﺪن" دارﯾﻢ.ﯾﮕﺎﻧﯽ ﻋﻤﻠﮕﺮ از اﺱﺘﻔﺎدﻩ ﺑﺎ ﻣﺮﺟﻊ ﺑﺎزﮔﺮداﻧﺪن*ﺷﻮد ﻣﯽ اﻧﺠﺎم. int total; در ﺷﺪﻩ ذﺧﻴﺮﻩ ﺁدرس در ﻣﻮﺟﻮد ﻣﻘﺪارptrﻣﺘﻐﻴﺮ ﺑﻪtotalﺷ ﻣﯽ دادﻩ اﺧﺘﺼﺎصﻮد total = *ptr; اﺱﺖ ﻣﺜﺎل از اﺱﺘﻔﺎدﻩ ﮔﺮهﺎ اﺷﺎرﻩ از اﺱﺘﻔﺎدﻩ ﭼﮕﻮﻧﮕﯽ ﯾﺎدﮔﻴﺮی ﺑﺮای راﻩ ﺑﻬﺘﺮﯾﻦ.ﮐـﻪ اﻋﻤـﺎﻟﯽ اﻧﻮاع از ﻣﺜﺎﻟﻬﺎﯾﯽ اﯾﻨﺠﺎ در اﺱﺖ ﺷﺪﻩ ﺁوردﻩ ﺷﺪ ﺻﺡﺒﺖ ﺁﻧﻬﺎ ﻣﻮرد در.ﺁﯾﻨﺪ ﻣﯽ ﺡﺴﺎب ﺑﻪ ﻣﺸﮑﻞ ﻣﻮﺿﻮع ﯾﮏ ﮔﺮهﺎ اﺷﺎرﻩ.ﺑﺮاﯾﺘـﺎن ﻣﻄﻠـﺐ هﻨـﻮز اﮔﺮ ﻋﺠﻠﻪ ،اﺱﺖ ﻧﺸﺪﻩ روﺷﻦﻧﮑﻨﻴﺪ. اوﻟﻴﻪ ﻣﻘﺪاردهﯽ و اﻋﻼن اﺱﺖ ﺱﺎدﻩ ﻧﺴﺒﺘﺎ ﮔﺮهﺎ اﺷﺎرﻩ اوﻟﻴﻪ ﻣﻘﺪاردهﯽ و اﻋﻼن. int main() { int j; int k; int l; ﺑﻪ ﮔﺮ اﺷﺎرﻩ ﯾﮏintﮐﻨﺪ ﻣﯽ ﺗﻉﺮﯾﻒ: int *pt1; ﺑﻪ ﮔﺮ اﺷﺎرﻩ ﯾﮏintﮐﻨﺪ ﻣﯽ ﺗﻉﺮﯾﻒ: int *pt2; float values[100]; float results[100]; ﺑﻪ ﮔﺮ اﺷﺎرﻩ ﯾﮏfloatﮐﻨﺪ ﻣﯽ ﺗﻉﺮﯾﻒ: float *pt3; ﺑﻪ ﮔﺮ اﺷﺎرﻩ ﯾﮏfloatﮐﻨﺪ ﻣﯽ ﺗﻉﺮﯾﻒ: float *pt4; j = 1; k = 2; ﻣﺘﻐﻴﺮ ﺁدرسjﮔﺮ اﺷﺎرﻩ در راpt1دهﺪ ﻣﯽ ﻗﺮار: pt1 = &j; ﻣﺘﻐﻴﺮ ﺁدرسkﮔﺮ اﺷﺎرﻩ در راpt2دهﺪ ﻣﯽ ﻗﺮار: pt2 = &k; ﮔﺮ اﺷﺎرﻩ ر د را ﻣﻘﺎدﯾﺮ از ﻋﻨﺼﺮ اوﻟﻴﻦ ﺁدرسpt3دهﺪ ﻣﯽ ﻗﺮار: pt3 = values;
2.
ﺁﻣﻮزشC++-درس٨:ﮔﺮهﺎ اﺷﺎرﻩ ﺑﺮ
ای ﻣﻘﺪﻣﻪ http://www.persian-designers.com اﺱﺖ ﺑﺎﻻﯾﯽ ﻋﺒﺎرت ﻣﻉﺎدل ﻋﺒﺎرت اﯾﻦ: pt3 = &values[0]; return 0; } ﮔﺮ اﺷﺎرﻩ ﻣﺮﺟﻊ ﮔﺮداﻧﺪن ﺑﺎز/ﻣﻘﺪار ﺗﺨﺼﻴﺺ ﺡﺎﻓﻈ از ﺁدرﺱﯽ در ﻣﻮﺟﻮد دادﻩ در ﺗﻐﻴﻴﺮ اﺟﺎزﻩ ﻣﺮﺟﻊ ﮔﺮداﻧﺪن ﺑﺎزدهـﺪ ﻣﯽ را اﺱﺖ ﺷﺪﻩ ذﺧﻴﺮﻩ ﮔﺮ اﺷﺎرﻩ در ﮐﻪ ﻪ.اﺷـﺎرﻩ ﮐﻨﺪ ﻣﯽ ذﺧﻴﺮﻩ را ﺡﺎﻓﻈﻪ ﺁدرس ﯾﮏ ﮔﺮ.دادﻩ ﺗﻐﻴﻴﺮ ﺡﺎﻓﻈﻪ ﺁدرس ﺁن در ﻣﻮﺟﻮد ﺁدرس ﮐﻪ دهﺪ ﻣﯽ اﺟﺎزﻩ ﻣﺮﺟﻊ ﮔﺮداﻧﺪن ﺑﺎز ﺷﻮد.ﯾﮕﺎﻧﯽ ﻋﻤﻠﮕﺮ*رود ﻣﯽ ﺑﮑﺎر ﻣﺮﺟﻊ ﺑﺎزﮔﺮداﻧﺪن ﺑﺮای. *pt1 =*pt1 + 2; اﺷﺎر ﻣﻘﺪار ﺑﻪ ﺗﺎ دو ﻋﺒﺎرت اﯾﻦدر ﺷﺪﻩ ﻩpt1ﮐﻨﺪ ﻣﯽ اﺿﺎﻓﻪ.ﺑﻠﻪدر ﻣﻮﺟـﻮد ﺡﺎﻓﻈـﻪ ﺁدرس ﻣﺡﺘﻮﯾـﺎت ﺑـﻪ ﺗـﺎ دو ﻋﺒﺎرت اﯾﻦ ﮔﺮ اﺷﺎرﻩpt1ﮐﻨﺪ ﻣﯽ اﺿﺎﻓﻪ.،اﺻﻠﯽ ﺑﺮﻧﺎﻣﻪ ﺑﻪ ﺗﻮﺟﻪ ﺑﺎ ﺑﻨﺎﺑﺮاﯾﻦpt1ﻣﺘﻐﻴﺮ ﺁدرس ﺡﺎویjاﺱﺖ.ﻣﺘﻐﻴﺮjﺑﻪ١ﻣﻘـﺪاردهﯽ ﺑﻮد ﺷﺪﻩ.ﮐﺮدن اﺿﺎﻓﻪ ﻓﻮق ﻋﺒﺎرت ﺗﺎﺛﻴﺮ٢ﻣﺘﻐﻴﺮ ﺑﻪ ﺗﺎjاﺱﺖ. ﺁدرس ﻣﺡﺘﻮایﺷ دادﻩ ﺗﺨﺼﻴﺺ ﻣﺘﻐﻴﺮ ﯾﮏ ﯾﺎ و دﯾﮕﺮ ﮔﺮ اﺷﺎرﻩ ﯾﮏ ﺑﻪ اﺱﺖ ﻣﻤﮑﻦ ﮔﺮ اﺷﺎرﻩ در ﻣﻮﺟﻮدﻮد. ﮔﺮ اﺷﺎرﻩ ﺑﻮﺱﻴﻠﻪ ﺷﺪﻩ اﺷﺎرﻩ ﺡﺎﻓﻈﻪ ﻣﺡﺘﻮای ﺗﺨﺼﻴﺺpt1ﮔﺮ اﺷﺎرﻩ ﺑﻮﺱﻴﻠﻪ ﺷﺪﻩ اﺷﺎرﻩ ﺡﺎﻓﻈﻪ ﻣﺡﺘﻮای ﺑﻪPt2: *pt2 = *pt1; ﮔﺮ اﺷﺎرﻩ ﺑﻮﺱﻴﻠﻪ ﺷﺪﻩ اﺷﺎرﻩ ﺁدرس ﻣﺡﺘﻮای ﺗﺨﺼﻴﺺpt2ﻣﺘﻐﻴﺮ ﺑﻪk: k = *pt2; ﮔﺮ اﺷﺎرﻩ ﻣﺡﺎﺱﺒﺎت از ﻗﺴﻤﺘﯽهـﺎ اﺷـﺎرﻩ ﺧـﻮد در ﻣﺡﺎﺱـﺒﺎت اﻧﺠﺎم ﺗﻮاﻧﺎﯾﯽ ﺑﻪ ﻣﺮﺑﻮط ﮔﺮهﺎ اﺷﺎرﻩ ﻗﺪرتاﺱـﺖ.ﺗﻮاﻧﻨـﺪ ﻣـﯽ ﮔﺮهـﺎ اﺷـﺎرﻩﺑـﺎ ﻣﺡﺎﺱﺒﺎﺗﯽ ﻋﺒﺎرات از اﺱﺘﻔﺎدﻩ،ﺷﻮﻧﺪ اﺿﺎﻓﻪﺷﻮﻧﺪ دﺱﺘﮑﺎری ﯾﺎ و ﺷﻮﻧﺪ ﺗﻔﺮﯾﻖ.ﮔﺮ اﺷﺎرﻩpt3وﻧﻮع از ﺁراﯾﻪfloatﻧـﺎم ﺑﻪ valuesﺑﻴﺎو ﺧﺎﻃﺮ ﺑﻪ رارﯾﺪ. ﺁراﯾﻪ ﻋﻨﺼﺮ اوﻟﻴﻦ ﺁدرسvaluesﮔﺮ اﺷﺎرﻩ درpt3ﺷﻮد ﻣﯽ ذﺧﻴﺮﻩ: pt3 = &values[0]; زﯾﺮ ﻋﺒﺎرت اﺟﺮای ﺑﺎpt3ﺁراﯾﻪ ﻋﻨﺼﺮ دوﻣﻴﻦ ﺑﻪvaluesﮐﻨﺪ ﻣﯽ اﺷﺎرﻩ: pt3++; ﻋﺪد ﻣﻘﺪارPiﺁراﯾﻪ دوم ﻋﻨﺼﺮ درvaluesﯾﺎﺑﺪ ﻣﯽ ﺗﺨﺼﻴﺺ: *pt3 = 3.1415927; ﮔﺮ اﺷﺎرﻩ زﯾﺮ ﻋﺒﺎرت اﺟﺮای ﺑﺎpt3ﻋﻨﺼﺮ ﺑﻪ٢٧اراﯾﻪvaluesﮐﻨﺪ ﻣﯽ اﺷﺎرﻩ: pt3 += 25; ﻋﻨﺼﺮ ﻣﻘﺪار٢٧ﻣﻘﺪار ﺑﺮاﺑﺮ ﺁراﯾﻪ2.22222ﮔﻴﺮد ﻣﯽ ﻗﺮار: *pt3 = 2.22222; زﯾﺮ ﻋﺒﺎرت اﺟﺮای ﺑﺎpt3ﺁراﯾﻪ اﺑﺘﺪای ﺑﻪvaluesﮐﻨﺪ ﻣﯽ اﺷﺎرﻩ: pt3 = values; ﺡﻠﻘﻪ اﺟﺮای ﺑﺎforﺑﻪ ﺁراﯾﻪ ﻋﻨﺎﺻﺮ هﻤﻪ ﻣﻘﺪار زﯾﺮ37.0ﻣﯽ ﺗﺨﺼﻴﺺﯾﺎﺑﺪ: for (ii = 0; ii < 100; ii++) { *pt3++ = 37.0; } ﻋﺒﺎرتﺁراﯾﻪ ﻋﻨﺼﺮ اوﻟﻴﻦ ﺁدرس زﯾﺮvaluesدر راpt3دهﺪ ﻣﯽ ﻗﺮار: pt3 = &values[0]; ﻋﺒﺎرتﺁراﯾﻪ ﻋﻨﺼﺮ اوﻟﻴﻦ ﺁدرس زﯾﺮresultsدر راpt4دهﺪ ﻣﯽ ﻗﺮار: pt4 = &results[0]; for (ii=0; ii < 100; ii++;) { ﻋدر ﺁن ﺁدرس ﮐﻪ ای ﺡﺎﻓﻈﻪ ﻣﺡﻞ ﻣﺡﺘﻮای زﯾﺮ ﺒﺎرتpt3در را اﺱﺖ ﺷﺪﻩ ذﺧﻴﺮﻩ ای ﺡﺎﻓﻈﻪ ﻣﺡﻞ ﻣﺡﺘﻮایدر ﺁن ﺁدرس ﮐﻪpt4دهﺪ ﻣﯽ ﺗﺨﺼﻴﺺ ،اﺱﺖ ﺷﺪﻩ ذﺧﻴﺮﻩ. *pt4 = *pt3; pt4++; pt3++; } ﺗﺮﺟﻤﻪ:ﺻﺎﻓﺪل ﻣﺡﻤﺪ ﻣﻨﺒﻊ:com.about.cplus://http
Download now