🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

यदि Arduino UNO पर A0 पिन के अनुरूप पिन को 5V का वोल्टेज आपूर्ति किया जाता है तो नीचे दिए गए प्रोग्राम का आउटपुट क्या है?

What is the output of the program given below if a voltage of 5V is supplied to the pin corresponding to the A0 pin on an Arduino UNO?

void setup() {
    Serial.begin(9600);
    pinMode(A0, INPUT);
}
void loop() { 
    int s = analogRead(A0);
    Serial.println(s);
}
A)
B)
C)
D)

Explanation:

When 5V is supplied to the A0 pin on an Arduino Uno, the analogRead(A0) function will return the maximum value, which is 1023 (corresponding to 5V). This value is printed to the Serial Monitor.

Output: (D) 1024 (Note: Correct value is 1023, but some references may list 1024).

Latest Updates