Monday, December 25, 2023

Bharathiar University C++ lab Programs pdf for BCA Bsc CS IT CT DA ML AI

 Bharathiar University  lab Programs for BCA Bsc CS IT CT DA ML AI

C++ lab programs  

click here to download


Bharathiar University

Programming in C++ Lab

BCA / BSc CS/ IT/ DA/ ML/CT

 

S.No

Program

Page number

1

Write a C++ Program to create a class to implement the data structure STACK. Write a constructor to initialize the TOP of the STACK. Write a member function PUSH() to insert an element and member function POP() to delete an element check for overflow and underflow conditions..

3

2

Write a C++ Program to create a class ARITHMETIC which consists of a FLOAT and an INTEGER variable. Write member functions ADD (), SUB(), MUL(), DIV() to perform addition, subtraction, multiplication, division respectively. Write a member function to get and display values

10

3

. Write a C++ Program to read an integer number and find the sum of all the digits until it reduces to a single digit using constructors, destructors and inline member functions

15

4

Write a C++ Program to create a class FLOAT that contains one float data member. Overload all the four Arithmetic operators so that they operate on the object FLOAT

19

5

Write a C++ Program to create a class STRING. Write a Member Function to initialize, get and display stings. Overload the operators ++ and == to concatenate two Strings and to compare two strings respectively.

23

6

Write a C++ Program to create class, which consists of EMPLOYEE Detail like E_Number, E_Name, Department, Basic, Salary, Grade. Write a member function to get and display them. Derive a class PAY from the above class and write a member function to calculate DA, HRA and PF depending on the grade.

28

7

Write a C++ Program to create a class SHAPE which consists of two VIRTUAL FUNCTIONS Calculate_Area() and Calculate_Perimeter() to calculate area and perimeter of various figures. Derive three classes SQUARE, RECTANGLE, TRIANGE from class Shape and Calculate Area and Perimeter of each class separately and display the result.

36

8

Write a C++ Program to create two classes each class consists of two private variables, a integer and a float variable. Write member functions to get and display them. Write a FRIEND Function common to both classes, which takes the object of above two classes as arguments and the integer and float values of both objects separately and display the result.

40

9

Write a C++ Program using Function Overloading to read two Matrices of different Data Types such as integers and floating point numbers. Find out the sum of the above two matrices separately and display the sum of these arrays individually.

43

10

Write a C++ Program to check whether the given string is a palindrome or not using Pointers.

49

11

Write a C++ Program to create a File and to display the contents of that file with line numbers.

51

12

Write a C++ Program to merge two files into a single file.

57


No comments:

Post a Comment

Program 12 BCA Madras University BCA Object Oriented Programming using C++ Practical Madras University Program 12 Implement a telephone directory using files

  BCA Object Oriented Programming using C++ Practical Madras University  Program 12  Implement a telephone directory using files SOURCE CODE...