Suppose, the same function is defined in both the derived class and the based class. Now if we call this function using the object of the derived class. Compiler will call which function and elaborate the same used by the compiler
Create a class Employee with the data members such as name, id and total salary. Create a file as “Employee_Data” as binary file and write the information of four employees to that file. Open that file in reading mode and only display the record of 2nd and 3rd employees.
Create a class Employee with following data members, name, id, and salary as private data member. Create array of objects for four employees, compare their salary using operator overloading, and display the records of the student who is getting less salary.
Create a class Employee with the data members such as name, id and total salary. Create a file as “Employee_Data” as binary file and write the information of four employees to that file. Open that file in reading mode and only display the record of 2nd and 3rd employees.
Rotate Words Longer than given Length L by K lette
Given a sentence, write a program to rotate words longer than given length L by K letters towards the right.
Note: Even if K is greater than word length, rotate the word multiple times so that K letters will be rotated towards right.Input
The first line of input will contain a string.
The second line of input will contain two space-separated integers, denoting L and K.Output
The output should be a single line containing the sentence by rotating the words whose length is greater than L by K letters towards right.
Sample Input 1
My parents and I went to a movie
2 1
Sample Output 1
My sparent dan I twen to a emovi
Sample Input 2
We drink coffee every morning
4 30
Sample Output 2
We drink coffee every ngmorni
Given a MxN matrix, write a program to replace all elements that do not belong to principal-diagonal & anti-diagonal with Zeros.
Principal-diagonal elements are the set of elements of a matrix that lie on the line joining the top left corner to the bottom right corner.
Anti-diagonal elements are the set of elements of a matrix that lie on the line joining the bottom left corner to the top right corner.Input
The first line of input will contain two space-separated integers, denoting MxN matrix.
The next M lines will contain N space-separated integers.Output
The output should be MxN matrix by replacing elements that do not belong to principal-diagonal and anti-diagonal with Zeros. Print each row as a space separated integers in a single line.
Sample Input 1
5 5
4 3 7 6 4
4 4 7 7 6
9 5 8 5 9
3 6 6 2 4
3 7 4 4 3
Sample Output 1
4 0 0 0 4
0 4 0 7 0
0 0 8 0 0
0 6 0 2 0
3 0 0 0 3
Given a list of integers, write a program to print the count of all possible unique combinations of numbers whose sum is equal to K.
Input
The first line of input will contain space-separated integers.
The second line of input will contain an integer, denoting K.Output
The output should be containing the count of all unique combinations of numbers whose sum is equal to K.
Sample Input 1
2 4 6 1 3
6
Sample Output 1
3
What is computer networks? Briefly explain network application GPS and RFID. How UBER
and DHL using these applications in their business model discuss the case
Write a C ++ program in which you declare a variable that holds an hourly wage
Rotate Matrix Rings
Given a matrix of order M*N and a value K, write a program to rotate each ring of the matrix clockwise by K elements. If in any ring has less than or equal to K elements, then don’t rotate that ring.
Input
The first line of input will be two space-separated integers, denoting the M and N.
The next M lines will contain N space-separated integers.
The next line will contain an integer, denoting K.
Output
The output should be M*N matrix by rotating the matrix by K elements.
Sample Input 1
4 4
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
3
Sample Output 1
13 9 5 1
14 7 11 2
15 6 10 3
16 12 8 4
Sample Input 2
3 4
1 2 3 4
10 11 12 5
9 8 7 6
2
Sample Output 2
9 10 1 2
8 11 12 3
7 6 5 4