RuiViana

pointer.ino

Jul 12th, 2021
916
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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() {}
RAW Paste Data