In a C++ structure, which of the following statements tells the compiler to allocate memory for an instance of the structure?
- struct { ... };
- typedef struct { ... } StructName;
- StructName var;
- #include <iostream>
Explanation
In C++, when you use a statement like StructName var;,
it tells the compiler to allocate memory for an instance of the structure StructName.
Related MCQs
کمپیوٹر میں ہیش فنکشن کا بنیادی مقصد کیا ہے؟
- Data integrity verification and fast lookup
- Playing audio
- Increasing screen brightness
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
ایس ایس ڈی میں کس قسم کی میموری استعمال ہوتی ہے؟
- Magnetic memory
- Flash memory
- Optical memory
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
ای میل میں "بی سی سی" فیلڈ کا مقصد کیا ہے؟
- To add attachments to the email.
- To specify the recipient’s email address.
- To send a copy of the email to multiple recipients without revealing their email addresses to others.
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
کمپیوٹر سائنس کا بانی کون ہے؟
- Augusta Adaming
- Allen Turing
- Charles Babbage
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
پہلی خاتون کمپیوٹر پروگرامر کون تھیں؟
- Ada Lovelace
- Grace Hopper
- Katherine Johnson
- Margaret Hamilton