What is the difference between declaration and definition?
Answer Posted / soumyajit
During declaration we just specify the type and no memory
is allocated to the variable. But during the definition an
initial value is assigned and memory is allocated to the
variable.
or we can also say,
Declaration means just telling to complier about variable
or function but definition means actually allocating memory
for variable.
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How to hide the base class functionality in Inheritance?
Can an interface inherit a class?
Write a program to sort the number with different sorts in one program ??
What is object in oops?
Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.
What is difference between oop and pop?
What is the important feature of inheritance?
Whats oop mean?
Which is not an object oriented programming language?
What is pointer in oop?
Which is better struts or spring?
Give two or more real cenario of virtual function and vertual object
Why multiple inheritance is not possible?
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 is polymorphism oop?