What is a C++ class?
A class is a user-defined type combining data with the functions that operate on that data.
Study 08 Classes and Objects with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.
What is a C++ class?
A class is a user-defined type combining data with the functions that operate on that data.
What is an object in C++?
An object is an instance of a class. It occupies storage and has a lifetime.
What follows a class definition's closing brace?
The semicolon after a class definition's closing brace is required.
What do data members represent?
Data members represent an object's state; each object has its own non-static data members.
What is a member function?
A member function is associated with a class and operates on a particular object when called with the member-access operator `.`.
What does the implicit `this` pointer refer to?
Inside a non-static member function, the implicit `this` pointer refers to the object on which the function was called.
What does `const` promise on a member function?
A `const` member function promises not to modify the object's observable state through the object on which it is called.
What are the default access levels for `class` and `struct`?
Members of a `class` are `private` by default, whereas members of a `struct` are `public` by default.
What does a constructor do?
A constructor initializes an object automatically when it is created. It has the class's name and no return type.
What determines member-initialization order?
Members are initialized in the order they are declared in the class, not the order written in the initializer list.
What does `explicit` prevent on a constructor?
`explicit` prevents unintended implicit conversions for a constructor, such as rejecting `Meters distance = 5.0;`.
What is encapsulation?
Encapsulation combines state and behavior while controlling access to state. Private data and public operations can enforce valid object states.
A 14-question medium-difficulty quiz on Boolean algebra, logic gates, truth tables, and combinational circuits.
A focused set of flashcards covering Python variables, data types, expressions, control flow, functions, input, output, and common programming practices.
Learn how Boolean expressions, logical operators, and conditional structures let programs make reliable decisions, including how to handle boundaries, branch order, and testing.
Learn how computer memory stores and addresses information, how RAM and ROM differ, and how caches and the memory hierarchy balance speed, capacity, and cost.
A progressive guide to tree structure, binary-tree traversals, binary search tree operations, deletion, balancing, and the way tree height determines time and space costs.
A practical guide to integrating problem definition, data representation, modular programming, algorithms, complexity analysis, testing, correctness, and ethical evaluation into a responsible computer science capstone.
Reviews how interrupts support event handling and multitasking, and how Linux system calls use the RISC-V `ecall` instruction and register conventions.
This quiz covers process management, context switching and scheduling, multitasking, traps and interrupts, and RISC-V privilege transitions.
A quiz on operating-system system calls, including privileged-operation requests, process creation and execution with fork, exec, and waitpid, and signal handling.