Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What output does the following code generate? Why?

What output does it generate if you make A::Foo() a pure virtual function?

class A {
A() { this->Foo(); }
virtual void Foo() { cout << "A::Foo()" << endl; }
};

class B : public A {
B() { this->Foo(); }
virtual void Foo() { cout << "A::Foo()" << endl; }
};

int main(int, char**)
{
A objectA;
B objectB;

return 0;
}


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C++ Code Interview Questions

Code for Method of Handling Factorials of Any Size?

0 Answers  


Find the maximum product of three numbers in an array? Eg. 9,5,1,2,3 Max product= 9*5*3= 135 The array can hav negative numbers also..

7 Answers   CTS,


Write a program to enter 10 number of integer entries into an array n and then odds up all the odd entries. the program then displays the result. plssss answer assss fast asss u can...

1 Answers  


What will be the output- for(i=1;i<=3;i++) { printf("%d",i); continue; i++; }

5 Answers   Impetus,


Write a simple encryption program using string function which apply the substitution method.

0 Answers  


Write code for the multiplication of COMPLEX numbers?

0 Answers   IBM,


what is the best algorithm to sort out unique words from a list of more than 10 million words(1 crore+)? we need the best technique in the terms of execution time.

9 Answers   TCS,


Create a program to read two random data set in two files named data1.txt and data2.txt manifold contains integer numbers, whereas data2.txt file contains the float type numbers. Simpanlahmasing each into 2 pieces of data that is an array of type integer array and an array of type float, then calculate the average numbers in the second array.

0 Answers  


Write A C++ Program To Input A Number Between 20 To 99 And Display Its Numbername?

3 Answers   TCS,


write a program that can locate elements in array.

1 Answers  


Question 1: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date. *This Should Be Done IN C++

0 Answers  


Write an algorithm that receives a string and reverses it.

2 Answers  


Categories