COMPUTER
Download PDF Click here
فری تیاری کیلے Whatsappجوائن کریںClick
here
چار آپشن میں سے کسی ایک پر کلک کرنے سے جواب سرخ ہو جائے گا۔
- Using erase()
- Automatically
- Using delete
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
In C++, dynamically allocated memory with new is deallocated using delete.
delete[] is used to free memory allocated for arrays.
متعدد استثناء کو سنبھالتے وقت کونسا کیچ بلاک پہلے لکھا جانا چاہئے؟
- Order Irrelevant
- General
- Specific
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
Specific exceptions should be caught before general ones to avoid being overshadowed.
Writing a general exception first can prevent specific exception blocks from executing.
کسی رعایت کے بلاک کی وضاحت کے لئے کون سا کلیدی لفظ استعمال کیا جاتا ہے؟
- Finally
- Catch
- Try
- Throw
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
The try block is used to enclose code that may generate exceptions.
Exceptions thrown inside the try block are handled by corresponding catch blocks.
جب اوور رائڈنگ فنکشن بیس اور ماخوذ طبقے میں مندرجہ ذیل میں سے کون سا ہونا چاہئے؟
- Function name
- Return type
- Both A and B
- Parameter list
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
In function overriding, the function name and return type in the derived class must be the same as in the base class.
The parameter list also remains identical, ensuring the derived class redefines the base class behavior.
جب اوورلوڈنگ افعال مندرجہ ذیل میں سے کون سا مختلف ہونا چاہئے؟
- Function name
- Return type
- Both A and B
- Parameter list
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
Overloaded functions must have different parameter lists (number or type of parameters).
The function name remains the same, and return type does not differentiate overloaded functions.
جب اوورلوڈنگ افعال مندرجہ ذیل میں سے کون سا ہونا چاہئے؟
- Function name
- Return type
- Both A and B
- Parameter list
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
Function overloading requires the same function name but different parameter lists.
Return type can be the same or different, but it alone cannot distinguish overloaded functions.
کون سی خصوصیت اعلی سطحی ڈیزائن پر زور دے کر پیچیدگی کو آسان بناتی ہے؟
- Polymorphism
- Abstraction
- Inheritance
- All of them
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
Abstraction hides implementation details and focuses on high-level design concepts.
It helps manage complexity by showing only essential features to the user.
ایسی خصوصیت جو مختلف کلاسوں کی اشیاء کو ایک ہی پیغام پر مختلف انداز میں جواب دینے کے قابل بناتی ہے؟
- Polymorphism
- Abstraction
- Inheritance
- All of them
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
Polymorphism allows different classes to respond uniquely to the same function or message.
It enhances flexibility and code reusability in object-oriented programming.
مندرجہ ذیل میں سے کون سا رسائی کو کنٹرول کرکے کسی شے کے داخلی اعداد و شمار کی حفاظت سے متعلق ہے؟
- Polymorphism
- Encapsulation
- Inheritance
- All of them
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
Encapsulation hides an object’s internal data and exposes only necessary methods.
It controls access to data, ensuring integrity and security.
کون سا شیڈولنگ الگورتھم بھوک کا شکار ہے؟
- FCFS
- Round Robin
- Shortest Job Next
- None of these
اس سوال کو وضاحت کے ساتھ پڑھیں
Explanation
FCFS schedules processes in the order they arrive, ensuring every process eventually executes.
It is simple and fair, making it least prone to starvation compared to SJN or priority-based methods.