नीचे दिए गए कोड का उद्देश्य क्या है यदि इसे Arduino Uno पर निष्पादित किया जाता है?
What is the objective of the code given below if it is executed on the Arduino Uno ?
#include<EEPROM.h>
int pin=13;
void setup() {
pinMode(pin,OUTPUT);
Serial.begin(9600);
}
void loop() {
for(int i=0; i<EEPROM.length(); i++) {
EEPROM.write(i, 1);
}
digitalWrite(pin,HIGH);
exit(0);
}
A
Clear EEPROM
B
Fill EEPROM with 1's
C
Export EEPROM data
D
Fill EEPROM with 0's
Explanation
The code writes 1 to every byte in the EEPROM memory of the Arduino Uno, effectively filling the EEPROM with 1s. It then turns on the onboard LED (pin 13) and exits.
Objective: (B) Fill EEPROM with 1's.
Correct Answer: B) Fill EEPROM with 1's