Monday, January 1, 2018

WAP in C++ to find the length of a string and print the reversed String using pointers


Aim :  WAP in C++ to find the length of a string and print the reversed string using pointers

CODE:

OUTPUT:


WAP in C++ to swap two integers using pointers


Aim :  WAP in C++ to swap two integers using pointers

CODE:

OUTPUT:


WAP in c++ using pointers to find the smallest and the largest element in a dynamically created array


Aim :  WAP in c++ using pointers to find the smallest and the largest element in a dynamically created array

CODE:

OUTPUT:


WAP in C++ to find the sum of even/odd numbers using recursion.*/


Aim :  WAP in C++ to find the sum of even/odd numbers using recursion.*/

CODE:

OUTPUT:


WAP in C++ to find the sum of Fibonacci series using recursion.


Aim :  WAP in C++ to find the sum of Fibonacci series using recursion. 

CODE:

OUTPUT:


WAP in C++ to read file “sports.dat” and copy only those records where event name is ATHLETIC using the concept of Data file handling


Aim :  Given a binary file “sports.dat” containing records of the following structure type
Struct sports 
     char event[20];
     char participant[10][30]; 
}
WAP to read this file and create another file called “athletic.dat” copying only those records where event name is “athletic”

CODE:

OUTPUT:


WAP in c++ to create a class WORKER, create a binary file and write class objects to it and display them on screen after reading from the file


Aim :  WAP in c++ to create a class WORKER, create a binary file and write class objects to it and display them on screen after reading from the file.
- search it for a given data
- delete a given node.

- to insert a node

CODE:

OUTPUT:


WAP in c++ to create a class BOOK, create a binary file and write class objects to it and display them on screen after reading from the file.


Aim :  WAP in c++ to create a class BOOK, create a binary file and write class objects to it and display them on screen after reading from the file.
- search it for a given data
- delete a given node.

- to insert a node

CODE:

OUTPUT:


WAP in C++ to create a text file to input roll no. and marks of ten students and display them on screen after reading from the text file using data file handling


Aim :  WAP in C++ to create a text file to input roll no. and marks of ten students and display them on screen after reading from the text file using data file handling
- search it for a given data
- delete a given node.

- to insert a node

CODE:

OUTPUT:


WAP in C++ to create a text file and find the average word size .


Aim :  WAP in C++ to create a text file and find the average word size.
- search it for a given data
- delete a given node.

- to insert a node

CODE:

OUTPUT:


Write a program in C++ to read a text file and create a duplicate file by toggling the Characters


Aim :  Write a program in C++ to read a text file and create a duplicate file by toggling the Characters using the concept of DATA FILE HANDLING
- search it for a given data
- delete a given node.

- to insert a node

CODE:

OUTPUT:


WAP to create a text file and display number of words, alphabets, vowels and consonants and number of lowercase and uppercase letters using the concept of DATA FILE HANDLING


Aim :  WAP to create a text file and display number of words, alphabets, vowels and consonants and number of lowercase and uppercase letters using the concept of DATA FILE HANDLING
- search it for a given data
- delete a given node.

- to insert a node

CODE:

OUTPUT:


Write a menu driven program in C++ to create a linked list of integers/characters/structures and perform the given operations.


Aim :  Write a menu driven program in C++ to create a linked list of integers/characters/structures and perform the given operations.
- search it for a given data
- delete a given node.

- to insert a node

CODE:

OUTPUT:


Write a program in C++ to implement stack as a linked list


Aim :  WAP in C++ to implement stack as a linked list

CODE:

OUTPUT:


Write a program in C++ to implement queue as a linked list


Aim :  WAP in C++ to implement queue as a linked list

CODE:

OUTPUT:


Write a program in C++ to implement queue as an array


Aim :  WAP in C++ to implement queue as an array

CODE:

OUTPUT:


WAP in C++ to implement stack as an array


Aim :  Write a program (WAP) in C++ to implement stack as an array

CODE:

OUTPUT:


Write a menu driven program in C++ using user defined functions to convert decimal to binary, decimal to octal, decimal to hexadecimal and vice versa


Aim :  Write a menu driven program in C++ using user defined functions to convert decimal to binary, decimal to octal, decimal to hexadecimal and vice versa

CODE:

OUTPUT:


WAP to implement the concept of multilevel inheritance in C++


Aim :  WAP to implement the concept of multiple inheritance in C++;

CODE:

OUTPUT:


WAP to implement the concept of multiple inheritance in C++;


Aim :  WAP to implement the concept of multiple inheritance in C++;

CODE:

OUTPUT:


WAP to implement the concept of single inheritance in C++. Create a class Person and inherit class Student from it and display the information of a student by calculating his grade.


Aim :  WAP to implement the concept of single inheritance in C++.  Create a class Person and inherit class Student from it and display the information of a student by calculating his grade.

CODE:

OUTPUT:


WAP in C++ using function overloading to calculate area of circle, square, rectangle, right triangle and triangle using heron’s formulae

Aim :  WAP in C++ using function overloading to calculate area of circle, square and rectangle.

CODE:

OUTPUT:


WAP in C++ using function overloading to calculate a^b

Aim WAP using function overloading to calculate a^b when
A) a and b are integer 
B) a is real and b is integer 
C) a and b are real
D) a is integer and b is real

CODE:

OUTPUT:


Write a program in C++ to define the class bank shown below. Create an array of n objects and display the objects' details.

Aim : Write a program in C++ to define the class bank shown below. Create an array of n objects and display the objects' details.

class bank { 
private :
    Accno integer.
    Name character 20
    Acctype character 1 ('s','c') use enum
    Balance float
Public:
    Initial();
    Deposit();
    Withdrawl();
    Balance();
    Display();

}

CODE:

OUTPUT:


Write a program in C++ to define the class worker shown below. Create an array of n objects and display the objects' details.

Aim : Write a program in C++ to define the class worker shown below

class worker ( 
private :
      Wname character (20),
      Wno integer,
      Wgrate float,
      Hourlywagerate float,
      Totwage float,
      Calcwage(hrwg,wgrate)
public :
      Worker();
      Indata();
      Outdata();
)

CODE:

OUTPUT:


WAP in C++ to check the validity of date using structures

Aim : WAP in C++ to check the validity of date using structures

CODE:

OUTPUT: