Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Complex examples of C language pointers

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Earlier we mentioned that the meaning of the pointer is often in the Mini programs is not expressed, on complex programs, sometimes with the pointer, but can be more troublesome than no pointer, but in order to let everyone stabilize the use of the pointer, I still wrote a pointer using the water lamp program, the goal is to let everyone understand the pointer from the beginning of the complex program, when the program is complex hours will not be at a loss.

#include sbit ADDR0 = P1^0; sbit ADDR1 = P1^1; sbit ADDR2 = P1^2; sbit ADDR3 = P1^3; sbit ENLED = P1^4; void ShiftLeft (unsigned char *p); void main(){ unsigned int i; unsigned char buf = 0x01; ENLED = 0; //Enable Select Independent LED ADDR3 = 1; ADDR2 = 1; ADDR1 = 1; ADDR0 = 0; while (1){ P0 = ~buf; //buffer value is inverted and sent to port P0 for (i=0; i

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.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report