What and all can a compiler provides by default?

Answers were Sorted based on User's Feedback

What and all can a compiler provides by default?..

Answer / shakti singh khinchi

5 things:

1: default constructor.
2: default destructor.
3: default copy constructor.
4: assignment operator (=).
5: address operator ('&').

Is This Answer Correct ?    14 Yes 0 No

What and all can a compiler provides by default?..

Answer / dee

default constructor, destructor, default copy constructor,
assignment operator.

Is This Answer Correct ?    13 Yes 0 No

What and all can a compiler provides by default?..

Answer / sandy

Also operator "&"

class Test {};

int main()
Test t;
Test *ptr = &t;
return 0;

Is This Answer Correct ?    4 Yes 5 No

Post New Answer

More C++ General Interview Questions

How do you test your code?

4 Answers   Microsoft,

If we declare two macro with the same identifier without doing undef the first, what will be the result? eg: #define MAX_SIZE 100 #define MAX_SIZE 200 int table1[MAX_SIZE];

3 Answers  

Ask to write virtual base class code?

0 Answers   Satyam,

Write a C/C++ program to show the result of a stored procedure "PROC_RESET_MAIL" on database "USER_NOTIFY".

2 Answers   ABC, HCL, Accenture, Webyog, DataLand,

please help to write the code of chess game in c++??????????

1 Answers   NEC,

sizeof- is it functioning statically or dynamically?

2 Answers  

Design a program to input a date from user in the form day/month/year (e.g. 2/6/2000) and report whether it’s a valid date or not. The program should take account of leap years. You will need to know that a leap year is a year that is exactly divisible by 4, except that century years are only leap years if they are divisible by 400.

1 Answers  

write a programming using for loop in c++ to generate diamond trangel?

1 Answers   NIIT,

sizeof - is it a function or operator?

6 Answers   Honeywell,

Give a very good method to count the number of ones in a "n" (e.g. 32) bit number.

3 Answers  

What is a constructor initializer list and when we use constructor initializer list?

3 Answers   TCS, Soft Info,

Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;

0 Answers