Error while inputting EEPROM.read() and EEPROM.write() I am trying to store data in ATmega328 (Arduino Uno) using the following code using tinkercad:
#include &lt;EEPROM.h&gt;

void setup() {
  int addr, data=1;
  Serial.begin(9600);
  for (addr=0; addr&lt;1023; addr++) {
    EEPROM.write(addr, data);
  }
  for (addr=0; addr&lt;1023 ; addr++) {
    Serial.print(EEPROM.read(addr), DEC);
  }
}

When I simulate the code in the tinkercad, then i get the following error:
In function `main':
43: undefined reference to `loop'
 error: ld returned 1 exit status

Please help me where is the error in my code. I am not able to understand the error source.
Have you looked at any Arduino IDE example programs?
They all have a setup() and loop() function.
Apparently, Tinkercad is missing the loop() function in your code.
You can solve the issue by adding an empty void loop() { } after your void setup() { ... } code.