0
0
Embedded Cprogramming~10 mins

What is embedded C - Interactive Quiz & Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to declare a variable in embedded C.

Embedded C
int [1] = 10;
Drag options to blanks, or click blank then click option'
Acount
B10
Cint
Dmain
Attempts:
3 left
💡 Hint
Common Mistakes
Using a number as a variable name.
Using a keyword as a variable name.
2fill in blank
medium

Complete the code to include the standard input-output header in embedded C.

Embedded C
#include [1]
Drag options to blanks, or click blank then click option'
A"stdlib.h"
B"stdio.h"
C<stdio.h>
D<string.h>
Attempts:
3 left
💡 Hint
Common Mistakes
Using quotes instead of angle brackets for standard headers.
Including the wrong header file.
3fill in blank
hard

Fix the error in the embedded C function declaration.

Embedded C
void [1]() { }
Drag options to blanks, or click blank then click option'
AMain
Bmain
Cint
Dvoid
Attempts:
3 left
💡 Hint
Common Mistakes
Using uppercase 'Main' instead of 'main'.
Using a return type as the function name.
4fill in blank
hard

Fill both blanks to create a simple infinite loop in embedded C.

Embedded C
while ([1]) {
    [2];
}
Drag options to blanks, or click blank then click option'
A1
B0
Ccontinue
Dbreak
Attempts:
3 left
💡 Hint
Common Mistakes
Using 0 as the condition which stops the loop.
Using break inside the loop which exits it.
5fill in blank
hard

Fill all three blanks to define and call a function that returns the sum of two integers.

Embedded C
int [1](int a, int b) {
    return a [2] b;
}

int result = [3](5, 3);
Drag options to blanks, or click blank then click option'
Aadd
B+
Dsum
Attempts:
3 left
💡 Hint
Common Mistakes
Using different names for function definition and call.
Using wrong operator for addition.