Clicker Questions

Question 1: Here is a picture of "Dr. Plank's Binary Sleeping Clock" that sits on his bedside table:

The way it works is as follows: Consider the current time in number of seconds since midnight. This is a number between 0 and 24*3600. Now:

Of the choices below, what time could it be using a 24-hour HH:MM format? (If you can't tell, the yellow, white and right-blue lights are on -- those are the 3rd, 4th and 6th from the left).
A. 00:15     C. 03:55     E. 07:56     G. 12:12     I. 15:34
B. 03:24     D. 07:42     F. 11:05     H. 15:04     J. 23:16

Question 2: What is (0x73 ^ 0x37) in hex?
Question 3: My machine is little endian, and we know that 'c' is 0x63 in ASCII. Our machines are little-endian. What is the output of this program?

int main()
{
  int i;

  memcpy(&i, "cade", 4);        /* memcpy is memcpy(void *dest, void *src, int bytes); */
  printf("0x%x\n", i);
  return 0;
}


Question 4: What is the output of this program?

int main()
{
  char s[60];

  s[0] = 'm';
  s[1] = '\0';
  s[2] = 'x';
  s[3] = 'y';
  s[4] = 'z';

  strcat(s, "ab");
  printf("%s\n", s);
  return 0;
}


Question 5: The Arduino board above is an "Eleego UNO R3" board. What is your favorite Arduino board? (There's no "right" answer here -- I'm just curious. If you don't know, just answer "IDK" or "Fred").