create a class Matrix the stores it in a safe 2D array .that is it it should check for array index bounds .a constructor should allow the programmer to specify the actual dimensions of the matrix. define number functions : putel() for taking 3 argument row index , column index and the element storing it in the corresponding location. getel() for taking 2 arguments row and column indexes and returns the elements from that location . overload the operators +,-,and * appropriately
Write a program to writing in to a text file, read from a text file and display in c++
write a program for conversion from decimal to binary ,octal and hexadecimal .the program should be developed as follows:
(a).the base class convert has two variables initial and result in which initial is a number before conversion and result is
after conversion.
(b). it has two member functions getinit() and getconv() which return the initial value and converted value respectively.
(c). write a function compute which is a pure virtual function that actually does the conversion.
(d). separate derived classes for hexadecimal ,binary, octal, does the conversion by implementing the function compute.
(e). create the objects for each class using new operator.
(f). use the convert class type pointer to call the compute functions of the derived classes.
write a program to copy content of one file to another file in c++
given an input string Ayodhya your C program to count the number of vowels and consonants and print the frequency of occurrence of each vowel and consonant delete the vowels in the same input string and display the updated string
Sample input:
Enter the input string: Ayodhya
Sample output:
No of vowels:3
Frequency of occurrence:A-2;o-1
No of consonants:4
Frequency of occurrence:y-2;d-1;h-1
Create a person class with name as data member provide four functions in getname() to get input from user and put name to display output write two virtual functions getdata() and outstanding() where both these functions takes no argument and getdata() returns no value but outstanding() returns Boolean value . Derive student and professor from person. student class should contain gpa as its float type and overrides the virtual functions appropriately . In professor class provide number of applications as data members and override the virtual functions appropriately . Write a main program to declare a array of pointers to person object and depending on the choice from user create either a student object or professor object and store it in person array for n persons and display the details along with whether the person is outstanding or not
write a C program to convert the string "CEASER " to "HJFXJW "without using inbuilt function
Encapsulate the following Python code from Section 7.5 in a function named my_sqrt that takes a as a parameter, chooses a starting value for x, and returns an estimate of the square root of a.
while True:
y = (x + a/x) / 2.0
if y == x:
break
x = y
Hollow Rectangle - 2
Write a program to print a rectangle pattern of
The first line of input is an integer
In the given example,
3 rows and 10 columns.Therefore, the output should be
+----------+
| |
| |
| |
+----------+
Sample Input 1
3
10
Sample Output 1
+----------+
| |
| |
| |
+----------+
Sample Input 2
5
10
Sample Output 2
+----------+
| |
| |
| |
| |
| |
+----------+
Write a program to create a numeric file and split the file into two files, one containing all odd
numbers and another with even numbers.