answersLogoWhite

0


Best Answer

Merits of defining a pure virtual function: It enforces derived classes to implement the function, ensuring polymorphic behavior. It enables abstract classes to define a common interface. Demerits: It can hinder flexibility as derived classes must implement the function. It may also increase code complexity.

User Avatar

AnswerBot

1mo ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the merits and demerits of defining and declaring a pure virtual function in a program?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What are the Three characteristics of a program module?

Declaring,defining and calling function


What r the Demerits of function in C?

Write a merits and demerits of using function in program


Can you write a program without defining the function prototype?

Sure: int main (void) { puts ("Hello, world"); return 0; }


What are the five considerations in defining a video program?

design


What is the difference between declaring static variable as local and global?

There are two ways to declare varibles. 1. Locally 2. Globally When you declare a variable locally in any function that means it is only accessible by that function. When you declare a variable globally so it is accessible by all the functions in the program. Declaring variables with static keyword means you are setting its value null.


What are the five stages in program development and its definition?

Analysis: Gather and analyze requirements for the program. Design: Plan the structure and components of the program. Implementation: Write the actual code for the program based on the design. Testing: Verify that the program functions as intended and fix any bugs. Maintenance: Update and maintain the program to ensure continued functionality and relevance.


Which function is supported by an application program?

which function is support by an application program


What are its program components?

the main() function,the#include Directive, the variable definition. function prototype, program statements, the function definition,program comments and braces are the components of program in C++


Can you run java program without applying main method?

yes we can run java program without using main. we can run program by declaring the variable static..


What is the function of int in Java?

Well, you could be asking what the PURPOSE of "int" in code. If you say: int i = 0; You're declaring a variable to use in the program. int is an Integer keyword and it will store a number for you for use in loops or for doing math operations.


C program always begins with which function?

That's up to you, but the execution of the program begins with function main.


What is the name of the function which must be defined in a Java program?

The main function. Every program must have a main function and it must be declared static.