Advertisement
RuiViana

pointer.ino

Jul 12th, 2021
1,303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. void setup() {
  2.   Serial.begin(9600);
  3.   int firstvalue, secondvalue;
  4.   int * mypointer;
  5.   mypointer = &firstvalue;
  6.   *mypointer = 10;
  7.   mypointer = &secondvalue;
  8.   *mypointer = 20;
  9.  
  10.   Serial.println(firstvalue);
  11.   Serial.println(secondvalue);
  12. }
  13.  
  14. void loop() {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement