A keyword used in a function definition that means the function returns nothing.
What is void?
This part of memory stores temporary data and grows toward the code section
what is the stack?
This type of data structure stores multiple values of the same type in sequence.
What is an array?
This keyword is used to execute a block of code only if a specified condition is true.
what is if?
The first step in writing any C program
What is planning/psuedocode/algorithm design?
find the problem
if (x = y) {
printf("Equal");
}
we need to use == to do a comparison
A line of code that includes the Standard Input/Output library.
What is #include <stdio.h> ?
This is the name for the unique location assigned to each byte in memory.
What is an address?
This is the index of the first element in a C array.
what is array[0]?
This operator checks if two values are equal.
what does == do?
This type of language translates all code to machine language before execution.
what is a compiled language?
while ( i < 5);
{
printf("%d\n", i);
i++;
}
the loop is punctuated early with a semi-colon, so i will never increment, and while will continue
A variable that can only be accessed within the function it's defined in
what is a local variable?
This type of variable retains its value between function calls.
What is a static variable?
This is the syntax to access the third character in an array/string named name.
what is name[2]?
This loop always runs at least once, even if the condition is false.
what is do while?
Programming for an application that is simple, repetitive, requires low power and low memory, and may not support native development
What is embedded programming?
if (digitalRead(buttonPin) = HIGH) { // do something
}
this line is supposed to trigger when a button presses, but it never works, what's wrong?
used = instead of ==
This is the term for the mini-definition of a function placed at the top of the code.
what is a function prototype?
what is a double variable?
the term that indicates which element in an array you wish to access
what is index?
This type of loop is ideal for checking sensor input until a threshold is reached.
what is a while, polling, or event loop?
This is the correct way to declare a pointer to a character (char variable)
char *pc = &x
find the problem
char word[5] = "hello";
the array is too small to contain a null terminator
Tells the program to put aside a space in memory of a certain size and give it a name so that data can be saved to or copied from it
What is declaring a variable?
names that use special characters, spaces or keywords such as
calidonia's Arduino
float
*answer*
X!
What are some unacceptable variable names in C?
on the board! (or in chat)
declare and array called student of 10 chars, and store the name of a classmate who is not on your team in the array, 50 bonus points if you get their last name too.
what will this code do?
char student[] = {"Manolito Funderburg"};
*ON THE BOARD* (or in chat)
You want your microcontroller to turn on an LED only if the temperature is above 30°C and the humidity is below 40%. Write the conditional statement that would achieve this.
(just give me the initial conditional statement, no need for a full program just one line with the conditions)
if (temperature > 30 && humidity < 40 )
given the code:
char a = 10;
char b = 20;
char *ptr = &a;
*ptr = b;
what are the final values of a and b?
a = 20
b = 20
find the problem
int *ptr;
*ptr = 10;
a pointer needs to be set to an address, this is called de-referencing and uninitialized pointer