what is the function of 'this' operator ?

Answer Posted / madhu

'this' pointer is created when you create an object with
dynamic memory allocation. 'this' pointer will be created at
the time of object creation.
It holds the current object's address.
'this' cannot be used inside the static or a friend functions.

Is This Answer Correct ?    14 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

i am getting an of the type can not convert int to int *. to overcome this problem what we should do?

1837


Why do we use class in oops?

555


i=20;k=0; for(j=1;k-i;k+=j<10?4:3) { cout<

1417


#include #include #include #include void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort

2168


What is oops in programming?

568






What is encapsulation oop?

578


What is encapsulation and abstraction? How are they implemented in C++?

637


What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }

1986


What is overloading in oop?

577


what is the sylabus for priliminaries?

1691


What is encapsulation with real life example?

572


What is encapsulation c#?

600


Whats is abstraction in oops?

593


What is ambiguity in inheritance?

625


What is difference between multiple inheritance and multilevel inheritance?

603