what is the difference between virtual function and
destoctor?
Answer / prabhakar
virtual function is just like a member function of a class.it is used to over loading mechanisam.it can be acesses by any object of either base class or derived class.
destructor is used to dellocate the memory of an object.it can call by using delete operator.
| Is This Answer Correct ? | 3 Yes | 0 No |
Why do we use inheritance?
write a c++ code to overload + and - for a stack class such that + provides push and - provides pop operation
1 Answers College School Exams Tests, HCL, IBM, TCS,
explain defference between structure and class with example
Which is the only operator in C++ which can be overloaded but NOT inherited?
What is variable example?
How do you achieve polymorphism?
what is the realstic modeling?
What is class and object in oops?
Write a program to compute for numeric grades for a course. The course records are in a file that will serve as the input file. The input file is in exactly the following format: Each line contains a student's first name, then one space, then ten quiz scores all on one line. The quiz scores are in whole number and are separated by one space. Your program will take it input from this file and sends it output to a second file. The data in the output file will be exactly the same as the data in the input file except that there will be one additional number (of type double) at the end of each line. This number will be the average of the student's ten quiz scores. Use at least one function that has file streams as all or some of its arguments.
Why do we use class?
Why do while loop is used?
In the following declaration of main, "int main(int argc, char *argv[])", to what does argv[0] usually correspond? 1) The first argument passed into the program 2) The program name 3) You can't define main like that