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

ย 

ย