Juxtapose the use of override with new. What is shadowing?
Answer / nawaz
Using override keyword to a method in the derived class
meaning the method provides a new implementation to the
overridden method (same signature) in the base class. The
base method must be virtual, abstract, or override.
By default a method is not modified by ‘virtual’. So if a
method in derived class wants to override the base
implementation, it needs to be modified by ‘new’ keyword.
This is called shadowing, not overriding. The method in the
derived HIDES the one in the base class.
Is This Answer Correct ? | 3 Yes | 0 No |
State two uses of pointers in C?
What is the use of typedef in c?
can you change name of main()?how?
Develop a flow chart and write a c program to find the roots of a quadratic equation ax2+bx+c=0 using switch and break statement.
why u join this call center?
What is %s and %d in c?
what is the difference between malloc() and calloc() function?
Sir,please help me out with the code of this question. Write an interactive C program that will encode or decode multiple lines of text. Store the encoded text within a data file, so that it can be retrieved and decoded at any time. The program should include the following features: (a) Enter text from the keyboard, encode the text and store the encoded text in a data file. (b) Retrieve the encoded text and display it in its encoded form. (c) Retrieve the encoded text, decode it and then display the decoded text. (d) End the computation. Test the program using several lines of text of your choice.
what is use of malloc and calloc?
What is sorting in c plus plus?
write a c program to print the next of a particular no without using the arithmetic operator or looping statements?
What is array in C