|
META TOPICPARENT |
name="CourseExercises" |
Mid - Semester Quiz Embedded Systems course General remarks: In the following quiz more than one answer may be correct or all of the answers may be wrong. Linux commands
-
You have downloaded the file yesterday.txt into your Downloads directory, which is a sub-directory of your home directory, as is the directory exercises. You want to copy this file into the exercises/solutions/exercise_2 First you do:
cd ~/exercises/solutions/exercise_3
Which of the following commands will copy the file as desired?
|
|
< < | |
> > | |
| |
|
< < | |
> > | |
| -
You are the super user and you do: cd / rm -rf
This will: |
|
< < | |
> > | |
|
-
You type: ls ~/Downloads > downloads.txt
What will it print?
-
All the file names in your Download directory
-
nothing, but it will create an empty file named downloads.txt
|
|
< < | |
> > | |
|
C programming |
|
> > | |
|
-
What does this function do?

|
|
< < | |
> > | |
|
-
It calculates and returns the value of the sin function of an angle, which must be given radians (the angle parameter must be a double value in radians)
-
It returns an error message
-
It is simply plain wrong and does not compile
|
|
< < |
-
Here is an add function and its calling main program in a single file . The file is named “add.c”. What does this program do?

|
> > | - Here is an add function and its calling main program in a single file . The file is named “add.c”. What does this program do?
|
| |
|
< < | |
> > | |
| |
|
< < |
Pointers
You declare a pointer in this way:
char *helloWorld=”Hello World!”; |
> > | |
| |
|
< < | char *helloPtr = helloWorld;
|
> > | - Pointers
You declare a pointer in this way:
char *helloWorld=”Hello World!”; char *helloPtr = helloWorld;
What is the value of the helloPtr?
-
The address of the character ‘H’
-
The character H, which has the hex value of 0x48
-
It contains all the characters of the string “Hello World!”
-
The same value as helloWorld
-
none of the above
|
|
The Raspberry Pi
-
What is gpio?
|
|
< < | |
> > | |
| |
|
< < | What is the I2C bus? |
> > | - What is the I2C bus?
|
| |
|
< < | |
> > | |
|
-
-
Vcc
-
ground
-
a data line (SDA)
|
| Understanding data sheets
Please read the attached data sheet and find out what the device does |
|
< < | |
> > | |
|
-
It is a device that is used to store non-volatile information in a micro-controller chip such as the ARM processor we use on the Raspberry Pi
-
It is a memory type specially designed for embedded systems
-
It is a memory type used within sensors
|
|
< < | Good luck! |
> > | Good luck! Solutions:
The correct answers are highlighted in blue. |
|
-- Uli Raich - 2017-11-15 |