What and all can a compiler provides by default?
Answers were Sorted based on User's Feedback
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 |
Answer / dee
default constructor, destructor, default copy constructor,
assignment operator.
| Is This Answer Correct ? | 13 Yes | 0 No |
Answer / sandy
Also operator "&"
class Test {};
int main()
{
Test t;
Test *ptr = &t;
return 0;
}
| Is This Answer Correct ? | 4 Yes | 5 No |
When does a name clash occur in c++?
What is a virtual destructor?
What is the difference between shallow copy and deep copy?
To what does “event-driven” refer?
1)#include <iostream.h> int main() { int *a, *savea, i; savea = a = (int *) malloc(4 * sizeof(int)); for (i=0; i<4; i++) *a++ = 10 * i; for (i=0; i<4; i++) { printf("%d\n", *savea); savea += sizeof(int); } return 0; } 2)#include <iostream.h> int main() { int *a, *savea, i; savea = a = (int *) malloc(4 * sizeof(int)); for (i=0; i<4; i++) *a++ = 10 * i; for (i=0; i<4; i++) { printf("%d\n", *savea); savea ++; } return 0; } The output of this two programs will be different why?
When there is a global variable and local variable with the same name, how will you access the global variable?
What is buffering in c++?
What is OOPs
What are the differences between malloc() and calloc()?
What is the difference between a baller and a reference in C++?
What is the output of printf("%d")?
58 Answers CTS, HCL, Infosys, TCS, Winit, Wipro,
How do you link a C++ program to C functions?