Answer Posted / azaad
static is keyword which is used for a variable and also for
a method.
static variable is initialized only once (i.e)one time memory.
static method of a class should not called with an objecy it
should be called with class name...
syntax: class-name.static method()
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Please send ford technologies placement paper 2 my mail id
What is difference between polymorphism and inheritance?
Why is there no multiple inheritance?
Explain the advantages of inheritance.
What is polymorphism give a real life example?
Can an interface inherit a class?
What is byval and byref? What are differences between them?
How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction
What is polymorphism in oops with example?
write a program to find 2 power of a 5digit number with out using big int and exponent ?
How to hide the base class functionality in Inheritance?
What do you mean by variable?
Can abstract class have normal methods?
Question: 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.
What are the three main types of variables?