Embercode
✕
C++ Variables and Data TypesQuick quiz

Arguments and naming

6 questions. Covers Naming and reading declarations.

Questions 1 to 5 of 6

  1. 1. A user runs ./tool with nothing typed after the program name. What is argc when main starts?
  2. 2. What does the declaration const int* view; mean?
  3. 3. What does this program print? ``cpp #include <charconv> #include <iostream> #include <string_view> int main() { std::string_view text = "12abc"; int value = 0; auto [ptr, ec] = std::from_chars(text.data(), text.data() + text.size(), value); std::cout << value << " " << (ptr == text.data() + text.size()) << "\n"; } ``
  4. 4. Which C++ keyword marks a value that the compiler must know before the program runs?

    Type your answer.

  5. 5. Which header must you include to use std::from_chars? Give the header name as it appears in #include <...>.

    Type your answer.

5 question(s) left on this page.

Typed answers ignore extra spaces and, for most questions, capital letters.