250+ TOP MCQs on Programming – Language Used and Answers

Arduino Questions and Answers for Freshers on “Programming – Language Used”.

1. What language is a typical Arduino code based on?
a) C/C++
b) Java
c) Python
d) Assembly Code
Answer: a
Calrification: The Arduino code is basically a lightly modified version of the C++ programming language. It includes certain functions or modules that are specific to the development of the Arduino platform and was preinstalled in the language by the developers.

2. Can you run an Arduino code in Raspberry Pi or any other microcontroller or embedded system?
a) Yes
b) No
Answer: b
Calrification: The Arduino code uses a lot of pre-built libraries that are specific to the Arduino platform and would certainly not work on any other platform. However, one can remove the lines of code containing the prebuilt libraries from their code and use the code to run on any other C++ platform performing other minor modifications to the code, since the original Arduino code is after all based on C++.

3. What language is the Arduino IDE built on?
a) C/C++
b) Python
c) HTML
d) Java
Answer: d
Calrification: The Arduino code is primarily a subset of the C++ programming language. However, the IDE (Integrated Development Environment) was written in the Java programming language. An IDE is a software that provides primarily a graphical user interface for compiling and maintaining/editing code for a platform.

4. Is the Arduino programming language a general-purpose language?
a) Yes
b) No
Answer: b
Calrification: The Arduino language is a modified version or subset of the C++ programming language. Hence even if the C++ programming language is a general-purpose programming language, due to the inclusion of certain specific libraries in the subset, the Arduino code cannot run on any other embedded system other than another Arduino board, thus making the programming language platform specific.

5. Is it possible to write code for the Arduino in any other programming language?
a) Yes, you can write
b) No, it only allows the use of Arduino Code
c) Yes, but you must write the code in C/C++ only
d) Yes, but you must write the code in Python Only
Answer: a
Calrification: The Arduino compiler actually translates or in more technical terms ‘compiles’ the code into assembly language which uses the Arduino’s instruction set. Thus, any other language which has a compiler capable of translating or compiling that code into the Arduino’s instruction set in assembly can essentially be used for writing Arduino code.

6. Does the Arduino code get processed by an interpreter or a compiler?
a) The Arduino code is processed by an interpreter
b) The Arduino code is first compiled to C++ and then processed using an interpreter
c) The Arduino code is processed by a compiler
d) The Arduino code is directly executed by the processor
Answer: c
Calrification: The Arduino code is a working subset of the C++ programming language. The C++ programming language is a compiled one, not an interpreted language. The main difference between an interpreter and a compiler is the way that each one of them handles the debugging and execution of the code. A compiler first checks if the code has any syntax errors or not and then proceeds to converting or more appropriately translating the written code into assembly, while the interpreter executes the code line by line irrespective of whether there is any syntax error in the code or not.

7. What is the difference between an IDE and a compiler?
a) The IDE executes the code while the compiler gives a graphical environment for writing the code
b) The compiler executes the code while the IDE gives a graphical environment for writing the code
c) The compiler links the code to the respective files and the IDE takes it from there
d) The compiler and the IDE are the same thing
Answer: b
Calrification: According to the primary definitions of a compiler and an IDE, the job of debugging and executing a piece of code falls on the compiler, while the job of the IDE is to provide an easy to use environment for writing the code in the first place.

8. Can external generic C/C++ libraries be imported to the Arduino IDE and used in the code?
a) Yes, external C/C++ libraries can be used with the Arduino code
b) No, no external libraies can be imported to the Arduino code
c) Yes, but only libraries that are approved by the company can be used
d) Yes, but the libraries must be written in Arduino Code only
Answer: a
Calrification: Since the Arduino Language is a subset of the C++ programming language, any existing C/C++ library can be used for importing into an Arduino code. There is no restriction on the use of external libraries since most of the Arduino ecosystem is Open-Source.

9. Is the Arduino code an Object-Oriented programming language or a Procedural programming language?
a) The Arduino Code follows the Object-Oriented ideology
b) The Arduino Code follows the Top-Down Procedural ideology
c) The Arduino Code follows the Bottom-Up Procedural ideology
d) The Arduino Code follows a custom Procedural Ideology
Answer: a
Calrification: Since the Arduino Programming Language is a subset of the C++ Programming Language, it supports the Object-Oriented Programming approach much like C++.

10. Arduino Codes are referred to as ________ in the Arduino IDE.
a) drawings
b) notes
c) sketches
d) links
Answer: c
Calrification: Any Arduino Code that is saved using the Arduino IDE, is referred to as a “sketch” by the Arduino IDE. These “sketches” are nothing but the code saved in a file with the extension name being “.ino”.

To practice all areas of Arduino for Freshers,