I/O Errors Flashcards

1
Q

How are inputs to a c++ deliniated?

A

By white space.
“./MyCode.exe in1 in2 in3” becomes {“MyCode.exe” “in1”, “in3”, “in3”}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the string to datatype conversion functions?

A
  • stoi (int)
  • stod (double)
  • stof (float)
  • stol (long)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a Usage Message?

A

A message that will print when argc == 1 (or greater than required argc) telling the user how to use the program. Stops execution after.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

When returning from main, what does a value of ‘0’ signify?

A

Normal execution, no problems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What library contains all the exception and error classes for c++?

A

“stdexcept”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why is it important to know what a method / functions throws in C++?

A

Because, unlike Java, calling methods / functions are not aware of what the called method throws.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is throwable in C++?

A

Everything.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

In C++ try catch blocks, what is the universal catch operator?

A

catch(…)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly