Tuesday 26 December 2017

CPP

Slip1




Slip2



Slip3


 
Slip4

Slip5
Q.2)     Write C++ program to Create two classes Array1 and Array2 which contains data members as Integer array of a specified size. Write necessary member functions to accept and display array elements of both the classes. Find and display smallest number from both the array. (Use Friend function and Memory Management operators)                                                                                                                                                         
Slip6



Slip7


Slip8


Slip9



Slip10

Slip11


Slip12

Slip13


                                                                                                    

Slip14




Slip15


                                                                             

Slip16


Slip17   


Slip18

characters, words and lines from a file. Find the number of occurrences of a given word  present in a file.                                                                                                    

Slip19




Slip20



Slip21
                                                                                                                                      

Q.1)     Write a C++ program to swap two integer values and two float values by using function template.                                                                                                                

Slip22
                                                                                                                       

Write a C++ program to perform read, convert and display operations. (Use Pure virtual function)                                                                                                               

Slip23


                                                                                                                
Slip24



    1. To accept float numbers
    2. To display float numbers in right justified format with precision of two digits
    3. To Exchange the private values of both these classes by using Friend function.                                                                                                                  

Slip25


(Use Function Overloading)                                                                               

                                                              
Slip26


Q.2)     Write a C++ program which will accept ‘n’ integers from user through command line argument. Store Prime numbers in file “Prime.txt” and remaining numbers in “Others.txt”.                                                                                                      



                                                                                                                                        



Slip28



Q.2)     Create a base class Media. Derive two different classes Book (Book_id, Book_name, Publication, Author, Book_price) and CD (CD_title, CD_price) from Media. Write a C++ program to accept and display information of both Book and CD. (Use pure virtual function)                                                                                                              




Slip29


Slip30