what is virtual constroctor ? give an exam for it?-(parimal
dhimmar)
Answers were Sorted based on User's Feedback
Answer / subhashish sen
Constructor can not be virtual.becoz constuctor is an entity
which initializes the V-table(V-table stores the addresses
of all virtual member functions of a class.)So if we declare
a constructor as virtual then who will inialize V-table for
this constructor??Thats why constructor can never be virual.
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / john
virtual constructor is not possible.
This is because v-table is created only after the
constructor is called.
| Is This Answer Correct ? | 4 Yes | 0 No |
readers and writers problem
write a program that accepts a number and outputs its equivalent in words. take note that the maximum input is 3000
how to write a program that opens a file and display in reverse order?
How do I store linked list datas into an array?
Write a (n) algorithm that sorts n distinct integers, ranging in size between 1 and kn inclusive, where k is a constant positive integer. (Hint: Use a kn-element array.)
What will be the output- for(i=1;i<=3;i++) { printf("%d",i); continue; i++; }
Complexity T(n) Write a linear-time algorithm that sorts n distinct integers, each of which is between 1 and 500. Hint: Use a 500-element array. (Linear-time means your algorithm runs in time c*n + b, where c and b are any constants that do not depend on n. For example, your algorithm can run in time n, or time 2n + 1, or time 5n + 10, or time 100n + 6, but not time c*n*n = c*n?.)
A suduco given & u hv 2 check if it is incomplete(blanks left),or correct or incorrect
A string of charaters were given. Find the highest occurance of a character and display that character. eg.: INPUT: AEGBCNAVNEETGUPTAEDAGPE OUTPUT: E
Definition of priority queue was given. We have to implement the priority queue using array of pointers with the priorities given in the range 1..n. The array could be accessed using the variable top. The list corresponding to the array elements contains the items having the priority as the array index. Adding an item would require changing the value of top if it has higher priority than top. Extracting an item would require deleting the first element from the corresponding queue. The following class was given: class PriorityQueue { int *Data[100]; int top; public: void put(int item, int priority); // inserts the item with the given priority. int get(int priority); // extract the element with the given priority. int count(); // returns the total elements in the priority queue. int isEmpty(); // check whether the priority queue is empty or not. }; We had to implement all these class functions.
0 Answers Nagarro, Wollega University,
Write A C++ Program To Input A Number Between 20 To 99 And Display Its Numbername?
Display Pattern: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 …