Unlike most quizzes, you may work together, browse the web, run code, etc. when doing this quiz.
Question 1: Which of the following C++ elements are also in C?
Select all that apply
Question 2: There are many flavors of C. Some of our tool-chains will expect strict ANSI-compliant C.
You can get this version by running gcc -ansi -pedantic-errors
or clang -ansi -pedantic-errors
.
How does this standard differ from C++?
Select all that apply
Question 3: Consider the following code
int x[4];
int *y = &x[0];
Which one of the following expressions has different semantics for x
than it does for y
?
Question 4: How many int
s fit inside x
if x
is declared as int *x = malloc(8);
? Answer as an integer (in the usual base-10 notation).