Question 66
Which built-in Python function checks if a class is a subclass of another class?
issubclass(class, classinfo) checks class inheritance relationships directly.
Which built-in Python function checks if a class is a subclass of another class?
issubclass(class, classinfo) checks class inheritance relationships directly.
In C and C++, what is a 'Structure Padding'?
Compilers align structure fields on 2, 4, or 8-byte boundaries to optimize CPU memory bus fetch efficiency.
What is the output of the Python expression: 'python'[::-1]?
String slicing [start:stop:step] with step -1 reverses the string sequence.
In C++, what is a 'Explicit Constructor' declared using the 'explicit' keyword?
Declaring single-argument constructors 'explicit' disables implicit copy-initialization conversions.
Which pragma directive in C/C++ instructs the compiler to disable structure padding and pack structure members tightly?
#pragma pack(1) sets structure member alignment to 1 byte, removing alignment padding bytes.