C++ int ledPin-10; //use integer variable to store pin # for LED (global variabl
ID: 3920100 • Letter: C
Question
C++
int ledPin-10; //use integer variable to store pin # for LED (global variable) W connect LED this digital port/pin Initially, x[5] 40, 30, 20, 10, 5]; What is the value of the x array after the "first iteration" of the outer loop of a selection sort. (Note: assume selection sort arranges values from low to high.) W the setup) function runs once at startup void setup) pin 10 pinMode(led Pin, OUTPUT),W initialize the digital pin as an output. ? [ 5, 10, 20, 30, 401 L40, 30, 20, 10, 5] 5, 10, 20, 40, 30] [5, 30, 20, 10, 40] 5, 40, 30, 20, 10] LED W the loop routine runs over and over again forever void loop0 GND digitalWrite(ledPin, HIGH); delay(12) digitalWrite(ledPin, LOW); delay(8) #turn the LED on wait in msec Note. every LED needs a series resistor (200-1K ohms) tum the LED om W wait in msee What is duty cycle (%) of the blinking LED above? 40% 80% 25% 100%Explanation / Answer
Answer 1:
25%
Answer 2:
Option D: [5 30 20 10 40]
in the selection sort it will take one element and place it theri appropriate position here 40 position is last so it placed at last by swapping with 5
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.