Arduino Quiz Questions And Answers

Reviewed by Godwin Iheuwa
Godwin Iheuwa, MS (Computer Science) |
Database Administrator
Review Board Member
Godwin Iheuwa, a Database Administrator at MTN Nigeria, holds an MS in Computer Science, specializing in Agile Methodologies and Database Administration from the University of Bedfordshire and a Bachelor's in Computer Science from the University of Port Harcourt. His proficiency in SQL Server Integration Services (SSIS) and SQL Server Management Studio contributes to his expertise in database management.
, MS (Computer Science)
By Westfw
W
Westfw
Community Contributor
Quizzes Created: 2 | Total Attempts: 19,282
| Attempts: 18,078 | Questions: 11
Please wait...
Question 1 / 11
0 %
0/100
Score 0/100
1. To subtract 1 from a variable counter, you can use the following statement(s) (check all that apply)

Explanation

The correct answer options for subtracting 1 from a variable counter are counter--, --counter, counter -= 1, and counter = counter - 1. These options all perform the same operation of subtracting 1 from the value of the counter variable. The decrement(counter) option is not a valid syntax for subtracting 1 from a variable in most programming languages.

Submit
Please wait...
About This Quiz
Arduino Quiz Questions And Answers - Quiz


Here is an interesting quiz with informative questions and answers about Arduino and its related concepts. Arduino is an open-source hardware and software company, that deals in... see moredesigning and manufacturing single-board microcontrollers and microcontroller kits for building digital devices. If you think you have good knowledge about Arduino, then you must take up this quiz and see how well you can score. So, are you ready? Let's start then.
Good luck! see less

2. The "Arduino Language" is best described as?

Explanation

The "Arduino Language" is best described as a subset of standard C++. Arduino uses a simplified version of C++ to make it easier for beginners to program microcontrollers. While it shares similarities with C++, it has its own set of libraries and functions specifically designed for working with Arduino boards.

Submit
3.  Is there anything wrong with this line of code, if yes, what?  
if(myVar = true) Serial.println("The light is ON");

Explanation

The line of code is assigning the value of true to the variable myVar instead of checking if myVar is equal to true. To compare the value, the equality operator == should be used instead of the assignment operator =.

Submit
4. What is the value of foo when these lines of code are executed?  
foo = 12;
foo = foo % 10;

Explanation

% is the "modulus" or "remainder" operator. the value of a%b is the remainder when a is divided by b.

Submit
5. What is the index of the letter F in this array?  
char textMessage[] = "Have Fun with Arduino";

Explanation

The index of the letter F in the array "Have Fun with Arduino" is 5. This means that the letter F is the 6th character in the array, counting from 0.

Submit
6. What does this line of code do?  
temp = !temp;

Explanation

The "!" operator performs a logical (boolean) complement, true becomes false, HIGH becomes LOW (0 becomes 1, any non-zero value becomes 0.)

Submit
7. How many elements are in the array?  
char textMessage[] = "Have Fun with Arduino";

Explanation

The array "textMessage" contains 21 elements. In C and C++ programming languages, when a string is enclosed in double quotation marks (" "), each character of the string plus a null terminator ('\0') is automatically included in the array. Therefore, the string "Have Fun with Arduino" consists of 20 characters plus a null terminator, making a total of 21 elements in the array.

Submit
8. What does the word static do in this line of code?  
static int temperature = 0;

Explanation

"static", when applied to a local variable within a function, causes the variable to become "permanent", with it's value retained until the next time it is accessed from within that function (even if the function returns and is invoked again.)

Submit
9. What does this line of code do? counter++;

Explanation

The line of code "counter++;" adds 1 to the variable counter. It is a shorthand way of incrementing the value of the counter by 1.

Submit
10. What is the range of numbers you can store in a variable of type byte?

Explanation

In most programming languages, a variable of type byte can store integer values in the range of -128 to 127. This range represents 256 different possible values, covering both positive and negative numbers.

Submit
11. Which language features are NOT present in the normal Arduino environment? (Check all that apply)

Explanation

The normal Arduino environment does not include the Standard Template Library (STL), Exceptions, and the ability to work with Files. The STL is a library that provides a collection of generic algorithms and data structures, which are not available in the Arduino environment. Exceptions are a mechanism for handling errors and abnormal conditions, but Arduino does not support them. Similarly, Arduino does not have built-in support for working with files, such as reading from or writing to external storage devices.

Submit
View My Results
Godwin Iheuwa |MS (Computer Science) |
Database Administrator
Godwin Iheuwa, a Database Administrator at MTN Nigeria, holds an MS in Computer Science, specializing in Agile Methodologies and Database Administration from the University of Bedfordshire and a Bachelor's in Computer Science from the University of Port Harcourt. His proficiency in SQL Server Integration Services (SSIS) and SQL Server Management Studio contributes to his expertise in database management.

Quiz Review Timeline (Updated): Mar 21, 2024 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2024
    Quiz Edited by
    ProProfs Editorial Team

    Expert Reviewed by
    Godwin Iheuwa
  • Aug 30, 2018
    Quiz Created by
    Westfw
Cancel
  • All
    All (11)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
To subtract 1 from a variable counter, you can use the following...
The "Arduino Language" is best described as?
 Is there anything wrong with this line of code, if yes, what? ...
What is the value of foo when these lines of code are executed? ...
What is the index of the letter F in this array? ...
What does this line of code do?   temp = !temp;
How many elements are in the array? ...
What does the word static do in this line of code?...
What does this line of code do? counter++;
What is the range of numbers you can store in a variable of type byte?
Which language features are NOT present in the normal Arduino...
Alert!

Advertisement