How setup() is different from loop()?

Question :

How setup() is different from loop()?

setup() is called once in the program when a sketch starts after power-up. It is used to initialize variables, input and output pin modes, and other libraries needed in the sketch.

loop() is used after setup() been called, function loop() is executed repeatedly in the main program. It controls the board until the board is powered off or is reset.


Latest Current Affairs 2025 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad