가장 많이 묻는 면접 질문과 답변 & 온라인 테스트
면접 준비, 온라인 테스트, 튜토리얼, 라이브 연습을 위한 학습 플랫폼

집중 학습 경로, 모의고사, 면접 준비 콘텐츠로 실력을 키우세요.

WithoutBook은 주제별 면접 질문, 온라인 연습 테스트, 튜토리얼, 비교 가이드를 하나의 반응형 학습 공간으로 제공합니다.

Prepare Interview

모의 시험

홈페이지로 설정

이 페이지 북마크

이메일 주소 구독

C++ 면접 질문과 답변

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

관련 차이점

C vs C++Java vs C++

Ques 16. What are the advantages of inheritance?


? It permits code reusability.
? Reusability saves time in program development.
? It encourages the reuse of proven and debugged high-quality software, thus reducing problem after a system becomes functional.

도움이 되었나요? Add Comment View Comments
 

Ques 17. What is the difference between declaration and definition?


The declaration tells the compiler that at some later point we plan to present the definition of this declaration.
E.g.: void stars () //function declaration
The definition contains the actual implementation.
E.g.: void stars () // declarator
{
for(int j=10; j>=0; j--) //function body
cout<<?*?;
cout<<endl; }

도움이 되었나요? Add Comment View Comments
 

Ques 18. What is the difference between an ARRAY and a LIST?

Answer1
Array is collection of homogeneous elements.
List is collection of heterogeneous elements.

For Array memory allocated is static and continuous.
For List memory allocated is dynamic and Random.

Array: User need not have to keep in track of next memory allocation.
List: User has to keep in Track of next location where memory is allocated.

Answer2
Array uses direct access of stored members, list uses sequencial access for members.

//With Array you have direct access to memory position 5
Object x = a[5]; // x takes directly a reference to 5th element of array

//With the list you have to cross all previous nodes in order to get the 5th node:
list mylist;
list::iterator it;

for( it = list.begin() ; it != list.end() ; it++ )
{
if( i==5)
{
x = *it;
break;
}
i++;
}

도움이 되었나요? Add Comment View Comments
 

Ques 19. Does c++ support multilevel and multiple inheritance?


Yes.

도움이 되었나요? Add Comment View Comments
 

Ques 20. What is a template?


Templates allow to create generic functions that admit any data type as parameters and return value without having to overload the function with all the possible data types. Until certain point they fulfill the functionality of a macro. Its prototype is any of the two following ones:


template <class indetifier> function_declaration; template <typename indetifier> function_declaration;
The only difference between both prototypes is the use of keyword class or typename, its use is indistinct since both expressions have exactly the same meaning and behave exactly the same way.

도움이 되었나요? Add Comment View Comments
 

4) Does c++ support multilevel and multiple inheritance? 5) What is a template? " />

Most helpful rated by users:

Copyright © 2026, WithoutBook.