What is the role of `int main()` in a C++ program?
`main` is the program’s entry-point function and returns an integer status to the operating system.
Study 01 C++ Fundamentals and Program Structure with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.
What is the role of `int main()` in a C++ program?
`main` is the program’s entry-point function and returns an integer status to the operating system.
What does the `std::` prefix indicate?
The `std::` prefix identifies names provided by the C++ standard library’s `std` namespace and helps prevent name conflicts.
How do C++ header and source files commonly differ?
Header files commonly contain declarations, templates, and shared definitions; source files commonly contain function and class definitions.
What is a C++ translation unit?
A translation unit is the source produced after an included file’s contents are conceptually incorporated and prepared for compilation.
What are the typical stages from C++ source to execution?
Preprocessing handles directives, compilation checks and generates lower-level code, linking combines objects and libraries, and execution runs the executable.
What does GCC’s `-c` option do?
The `-c` option stops after compilation, producing an object file without performing the linking stage.
How do C++ single-line and block comments differ?
`//` comments continue to the line’s end, while `/* ... */` comments can span multiple lines.
What are the basic rules for ordinary C++ identifiers?
An identifier starts with a letter or underscore; later characters may also include digits. Identifiers are case-sensitive.
Why can’t `class` be used as a variable name?
A keyword has a predefined language meaning and normally cannot be used as a programmer-defined identifier, such as `class`.
What is a literal in C++?
A literal is a value written directly in source code, such as `42`, `3.14`, `'A'`, `"C++"`, `true`, or `nullptr`.
How does an expression differ from a statement?
An expression produces a value or performs an operation; a statement specifies an action or control operation. An expression followed by `;` is an expression statement.
How does C++ write formatted output to the console?
`std::cout` sends output through the standard output stream using the insertion operator `<<`.
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.