CS253: Software Development with C++

Spring 2020

IQ 01

CS253 IQ 01

Show Main.IQ01 as a slide show.

How are these quizzes scored?

  1. Each question is worth one point.
  2. Each question is worth two points.
  3. Each point is worth two questions.
  4. Each quiz is worth one point.
  5. Each quiz is worth one half point.

Is collaboration allowed on these quizzes?

  1. Yes.
  2. No.
  3. It’s not “collaboration”—it’s “sharing”.

Is collaboration allowed on homework?

  1. No.
  2. Not at all.
  3. Absolutely not.
  4. It is forbidden.
  5. No way.
  6. Yes!

Will these quizzes be available for study?

  1. Yes, which is really convenient.
  2. Yes, so I don’t have to note the important topics.
  3. Yes, because he’s a swell guy!
  4. No, because, well, …, Jack.

Will the answers be available for study?

  1. Yes, Jack will publish separate answers.
  2. No, so pay attention during the quizzes.

How should the instructor be addressed?

  1. “Jack”
  2. “Dr. Applin”
  3. “Mr. Applin”
  4. “Professor Applin”
  5. “Instructor Applin”
  6. “Bonehead”
  7. “Your Vegetarian Eminence”

What day do we have these quizzes?

  1. Always on Tuesday
  2. Always on Wednesday
  3. Always on Thursday
  4. Always on Friday
  5. None of the above

Is C++ backward-compatible with C?

  1. No.
  2. A little bit.
  3. Mostly.
  4. Yes.

Versions

Which version of C++ does this class focus upon?

  1. C++2003
  2. C++2011
  3. C++2014
  4. C++2017
  5. C++2020 🚀

Warnings

Which enables all g++ compiler warnings?

  1. g++ -Wall filename.cc
  2. g++ -Wall -Wextra filename.cc
  3. g++ -Wall -Wextra -Wpedantic filename.cc
  4. g++ -Weverything filename.cc
  5. none of the above

Size

When the code on the right is executed, which output will be guaranteed by the C++ standard?

cout << sizeof(int);
4
  1. 2
  2. 4
  3. 32
  4. 4294967295
  5. none of the above

What’s a valid declaration for main?

  1. int main(int argc, char *argv)
  2. public static void main(String[] args)
  3. void main(int argc, char **argv)
  4. void main(string argv[])
  5. int main(int argc, char *argv[])