Stellar Study Cards

C++ Flashcards | Master Programming Concepts Efficiently

94 Total Cards in This Deck

"C++ Flashcards | Master Programming Concepts Efficiently"

Arrow keys or swipe to navigate cards

1 / 94 Total
Basics of C++

What is C++ and how is it different from C?

2 / 94 Total
Basics of C++

What is a variable in C++?

3 / 94 Total
Basics of C++

How do you declare a variable in C++?

4 / 94 Total
Basics of C++

Explain the concept of 'pointers' in C++.

5 / 94 Total
Basics of C++

What is a loop in C++?

6 / 94 Total
Basics of C++

What is the purpose of the #include directive in C++?

7 / 94 Total
Basics of C++

What are the basic data types in C++?

8 / 94 Total
Basics of C++

What is an array in C++?

9 / 94 Total
Basics of C++

Describe the structure of a C++ 'if' statement.

10 / 94 Total
Basics of C++

What is the significance of 'main()' in a C++ program?

11 / 94 Total
2. Data Types and Variables

What is a data type in C++?

12 / 94 Total
2. Data Types and Variables

How do you declare an integer variable in C++?

13 / 94 Total
2. Data Types and Variables

What is the size of a float in C++?

14 / 94 Total
2. Data Types and Variables

Explain the difference between signed and unsigned integers.

15 / 94 Total
2. Data Types and Variables

What is a character data type and how do you declare it in C++?

16 / 94 Total
2. Data Types and Variables

Describe how to define a constant variable in C++.

17 / 94 Total
2. Data Types and Variables

What is the significance of the 'auto' keyword in C++?

18 / 94 Total
2. Data Types and Variables

How do you perform type casting in C++?

19 / 94 Total
Control Structures

What is the purpose of control structures in C++?

20 / 94 Total
Control Structures

How does an 'if' statement work in C++?

21 / 94 Total
Control Structures

What is a 'for' loop and when is it used?

22 / 94 Total
Control Structures

Describe the syntax of a 'while' loop in C++.

23 / 94 Total
Control Structures

What is the purpose of the 'do-while' loop?

24 / 94 Total
Control Structures

Explain the use of the 'switch' statement in C++.

25 / 94 Total
Control Structures

What is the role of the 'else if' ladder?

26 / 94 Total
Control Structures

How do you break out of a loop prematurely?

27 / 94 Total
Control Structures

What is the effect of a 'continue' statement in loops?

28 / 94 Total
Control Structures

How does a nested loop function in C++?

29 / 94 Total
Control Structures

What is a 'goto' statement and why is its use generally discouraged?

30 / 94 Total
Control Structures

Explain the use of block scope in control structures.

31 / 94 Total
Functions in C++

What is a function in C++?

32 / 94 Total
Functions in C++

How do you declare and define a function in C++?

33 / 94 Total
Functions in C++

What is the purpose of a function prototype in C++?

34 / 94 Total
Functions in C++

What is the difference between arguments and parameters in C++?

35 / 94 Total
Functions in C++

How can you return multiple values from a function in C++?

36 / 94 Total
Functions in C++

What is an inline function in C++?

37 / 94 Total
Functions in C++

Explain the concept of function overloading in C++.

38 / 94 Total
Functions in C++

What is a recursive function in C++?

39 / 94 Total
Functions in C++

What is the default argument in C++ functions?

40 / 94 Total
Functions in C++

Describe lambda functions in C++.

41 / 94 Total
C++ Object-Oriented Programming

What is Object-Oriented Programming (OOP)?

42 / 94 Total
C++ Object-Oriented Programming

What is a class in C++?

43 / 94 Total
C++ Object-Oriented Programming

What is an object in C++?

44 / 94 Total
C++ Object-Oriented Programming

What does encapsulation mean in OOP?

45 / 94 Total
C++ Object-Oriented Programming

What is inheritance in C++?

46 / 94 Total
C++ Object-Oriented Programming

What is polymorphism in C++?

47 / 94 Total
C++ Object-Oriented Programming

What is abstraction in OOP?

48 / 94 Total
C++ Object-Oriented Programming

How do you define a class in C++?

49 / 94 Total
C++ Object-Oriented Programming

What is a constructor in C++?

50 / 94 Total
C++ Object-Oriented Programming

What is a destructor in C++?

51 / 94 Total
C++ Object-Oriented Programming

How is function overloading implemented in C++?

52 / 94 Total
C++ Object-Oriented Programming

What is the purpose of the 'this' pointer in C++?

53 / 94 Total
C++ Object-Oriented Programming

What is an abstract class in C++?

54 / 94 Total
C++ Object-Oriented Programming

Can you explain the concept of method overriding in C++?

55 / 94 Total
C++ Object-Oriented Programming

What are access specifiers in C++?

56 / 94 Total
C++ Pointers and References

What is a pointer in C++?

57 / 94 Total
C++ Pointers and References

How do you access the value pointed to by a pointer?

58 / 94 Total
C++ Pointers and References

What is a reference in C++?

59 / 94 Total
C++ Pointers and References

How do you pass a variable by reference to a function in C++?

60 / 94 Total
C++ Pointers and References

What is the NULL pointer in C++?

61 / 94 Total
C++ Pointers and References

What does the 'const' keyword mean when used with pointers?

62 / 94 Total
C++ Pointers and References

Can a reference be made to refer to a different object after it is initialized?

63 / 94 Total
C++ Pointers and References

How can you distinguish a pointer from an array in C++?

64 / 94 Total
C++ Pointers and References

Explain the use of the 'this' pointer in C++.

65 / 94 Total
C++ Standard Template Library (STL)

What is the Standard Template Library (STL) in C++?

66 / 94 Total
C++ Standard Template Library (STL)

What are the main components of the STL?

67 / 94 Total
C++ Standard Template Library (STL)

How do iterators function in C++ STL?

68 / 94 Total
C++ Standard Template Library (STL)

What is a container in STL?

69 / 94 Total
C++ Standard Template Library (STL)

What is the difference between a vector and a list in STL?

70 / 94 Total
C++ Standard Template Library (STL)

What is the purpose of algorithms in STL?

71 / 94 Total
C++ Standard Template Library (STL)

How does a map differ from a set in STL?

72 / 94 Total
C++ Standard Template Library (STL)

What are functors in C++ STL?

73 / 94 Total
C++ Standard Template Library (STL)

Explain the use of std::sort in STL.

74 / 94 Total
C++ Standard Template Library (STL)

What is the significance of std::find in STL?

75 / 94 Total
C++ Standard Template Library (STL)

How do you use std::for_each in STL?

76 / 94 Total
C++ Standard Template Library (STL)

What is the role of the std::vector in the STL?

77 / 94 Total
Error Handling in C++

What is error handling in C++?

78 / 94 Total
Error Handling in C++

What is an exception in C++?

79 / 94 Total
Error Handling in C++

How do you declare a try-catch block in C++?

80 / 94 Total
Error Handling in C++

What is the role of the 'try' block in C++?

81 / 94 Total
Error Handling in C++

What is the purpose of the 'catch' block in C++?

82 / 94 Total
Error Handling in C++

Explain the use of 'throw' in exception handling.

83 / 94 Total
Error Handling in C++

Can you catch multiple exceptions in a single try block? How?

84 / 94 Total
Error Handling in C++

What is a standard exception in C++?

85 / 94 Total
Advanced C++ Topics

What are template specializations in C++?

86 / 94 Total
Advanced C++ Topics

How does the 'auto' keyword enhance type inference in C++?

87 / 94 Total
Advanced C++ Topics

What purpose do lambda expressions serve in C++?

88 / 94 Total
Advanced C++ Topics

Define 'constexpr' in C++.

89 / 94 Total
Advanced C++ Topics

Explain the concept of move semantics and rvalue references.

90 / 94 Total
Advanced C++ Topics

How does 'std::unique_ptr' differ from 'std::shared_ptr'?

91 / 94 Total
Advanced C++ Topics

What is the role of the 'noexcept' specifier in C++ functions?

92 / 94 Total
Advanced C++ Topics

Describe the use of variadic templates in C++.

93 / 94 Total
Advanced C++ Topics

How does range-based for loop simplify iteration in C++?

94 / 94 Total
Advanced C++ Topics

Why are constexpr constructors important in C++?