What is the difference between declaration and definition?
Answer Posted / adarsh gupta
Function declaration -
*Requires semicolon,
*Contains actual parameters,
*Tells about the type of value returned by function,
*This unit can't be invoked from other parts of program.
Function definition-
*Don't require semi coloun,
*Contans the main part(main ligic) of the program,
*Can be invoked from other parts of program,
*Uses formal parameters.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Is enum a class?
What is coupling in oop?
How do you achieve polymorphism?
Which type does string inherit from?
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.
Can enum be null?
What are classes oop?
What is interface in oop?
What makes a language oop?
What is the significance of classes in oop?
Is data hiding and abstraction same?
why reinterpret cast is considered dangerous?
What is polymorphism give a real life example?
Which is not an object oriented programming language?
What is class and object with example?