人気の面接質問と回答・オンラインテスト
面接対策、オンラインテスト、チュートリアル、ライブ練習のための学習プラットフォーム

集中型学習パス、模擬テスト、面接向けコンテンツでスキルを伸ばしましょう。

WithoutBook は、分野別の面接質問、オンライン練習テスト、チュートリアル、比較ガイドをひとつのレスポンシブな学習空間にまとめています。

面接準備

模擬試験

ホームページに設定

このページをブックマーク

メールアドレスを登録

C++ 面接の質問と回答

Test your skills through the online practice test: C++ Quiz Online Practice Test

関連する比較

C vs C++Java vs C++

質問 101. What is an incomplete type?


Incomplete types refers to pointers in which there is non availability of the implementation of the referenced location or it points to some location whose value is not available for modification.

int *i=0x400 // i points to address 400
*i=0; //set the value of memory location pointed by i.

Incomplete types are otherwise called uninitialized pointers.

役に立ちましたか? コメントを追加 コメントを見る
 

質問 102. What is a dangling pointer?


A dangling pointer arises when you use the address of an object after
its lifetime is over. This may occur in situations like returning
addresses of the automatic variables from a function or using the
address of the memory block after it is freed. The following
code snippet shows this:

class Sample
{
public:
int *ptr;
Sample(int i)
{
ptr = new int(i);
}

~Sample()
{
delete ptr;
}
void PrintVal()
{
cout << "The value is " << *ptr;
}
};

void SomeFunc(Sample x)
{
cout << "Say i am in someFunc " << endl;
}

int main()
{
Sample s1 = 10;
SomeFunc(s1);
s1.PrintVal();
}

In the above example when PrintVal() function is
called it is called by the pointer that has been freed by the
destructor in SomeFunc.

役に立ちましたか? コメントを追加 コメントを見る
 

質問 103. Differentiate between the message and method.

Message:
* Objects communicate by sending messages to each other.
* A message is sent to invoke a method.

Method
* Provides response to a message.
* It is an implementation of an operation.

役に立ちましたか? コメントを追加 コメントを見る
 

質問 104. What is an adaptor class or Wrapper class?


A class that has no functionality of its own. Its member functions hide the use of a third party software component or an object with the non-compatible interface or a non-object-oriented implementation.

役に立ちましたか? コメントを追加 コメントを見る
 

質問 105. What is a Null object?


It is an object of some class whose purpose is to indicate that a real object of that class does not exist. One common use for a null object is a return value from a member function that is supposed to return an object with some specified properties but cannot find such an object.
 

役に立ちましたか? コメントを追加 コメントを見る
 

4) What is an adaptor class or Wrapper class? 5) What is a Null object? " />

ユーザー評価で最も役立つ内容:

著作権 © 2026、WithoutBook。