You have one base class virtual function how will call that
function from derived class?

Answer Posted / swetcha

class a
{
public virtual int m()
{
return 1;
}
}
class b:a
{
public int j()
{
return m();
}
}

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the two different types of polymorphism?

922


What are the 4 main oop principles?

961


What is multilevel inheritance explain with example?

889


Please send ford technologies placement paper 2 my mail id

1876


Why it is called runtime polymorphism?

820


What is the main feature of oop?

922


They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?

1653


Can we create object of abstract class?

866


What is the difference between a mixin and inheritance?

772


What is difference between polymorphism and inheritance?

843


What is the use of oops?

827


What is the problem with multiple inheritance?

868


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

2358


What is abstraction in oops with example?

1034


What do you mean by Encapsulation?

837