All Coursera Quiz Answers

The Arduino Platform and C Programming Week 2 Quiz Answer

In this article i am gone to share Coursera Course The Arduino Platform and C Programming Week 2 Quiz Answer

The Arduino Platform and C Programming Week 2 Quiz Answer


Also visit: The Arduino Platform and C Programming Week 1 Quiz Answer


 

Module 2 Quiz Answer

Question 1) What is the name of the library which contains the printf() function?

  • stdio.h
  • printer.h
  • stdlib.h
  • string.h

 Question 2) What does the ‘n’ character mean?

  • tab
  • newline
  • end of line
  • end of file

 Question 3) What type of data is surrounded by double quotes in a program?

  • a character
  • a string
  • a comment
  • a literal numerical value

 Question 4) What C type is one byte long?

  • int
  • char
  • string
  • float

 Question 5) Does the following statement evaluate to True or False?

(10 || (5-2)) && ((6 / 2) – (1 + 2))

  • True
  • False

Question 6) What does the following program print to the screen?

123456789
int main (){
int x = 0, y = 1;
if (x || !y)
printf(“1”);
else if (y && x)
printf(“2”);
else
printf(“3”);
}

  • 1
  • 2
  • 3
  • 1 3

Question 7) What does the following program print to the screen?

1234567
int main (){
int x = 0, z = 2;
while (x < 3) {
printf (“%i “, x);
x = x + z;
}
}

  • 0
  • 0 1
  • 0 2
  • 0 1 2

Question 8) What does the following program print to the screen?

int foo (int q) {
int x = 1;
return (q + x);
}
int main (){
int x = 0;
while (x < 3) {
printf (“%i “, x);
x = x + foo(x);
}

  • 0
  • 0 1
  • 0 2
  • 0 1 2