In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article will explain in detail how to use pointer variables in c language. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
1. As the transmission of function parameters, the address of the parameters we need has been transferred through the pointer in the function.
Int axiom 1 and int one (int * a recorder int * b) {function body} one (& a dint b)
2. Pass the array to the function. An array is a collection of data.
It cannot transfer all functions at once. We can transfer the array through the pointer and then manipulate the array.
Use the pointer as the function return value:
C language allows the return value of a function to be a pointer. We call the function that returns a pointer a pointer function.
# include#include#include// defines a function pointer. Initialization can only assign the function name void a (void (* p) ()) {p ();} void b () {printf ("I am function b\ n");} int main () {void (* p) (); / / defines a function pointer variable, which is used to store the entry address of the function. / / pass a behavior system ("pause"); return 0;} this is the end of the article on "how to use pointer variables in c language". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.