Sie sind auf Seite 1von 4

An file stores details of 5 students ( rollno, name, marks in three subjects ).

Write a program to
create such an report that print outs the name of students who have scored above 80%.

From a two dimensional array A[4] [4] write a program to prepare a one dimensional array B[16]
that will have all the elements of A if they are stored in row- major form . for example; for the
following array
1 2
3 4
5

10

11 12

13 14

15 16

The resultant array should be 1 2 3 4 5 6 7 8 9

10

11 12 13 14 15 16

Write a program to count the number of blanks and vowels present in a text file named
PARA.TXT. ( Create the file)

Program for Binary search on float array.

WAP to implement a Circular queue in an array of float data type. Write the functions Insert(),
Delete() and Display().

WAP to implement a Dynamic queue. Write the functions Insert(), Delete() and Display().

WAP depending upon the users choice either pushes or pops an element in a stack implemented
as an array.

WAP to implement a dynamic stack.

WAP using pointers


Find the length of a string
Copy a string to another string

WAP to Concatenating two strings using pointers

Define a class in C++ with following description:


Private Members
A data member Flight number of type integer
A data member Destination of type string
A data member Distance of type float
A data member Fuel of type float
A member function CALFUEL() to calculate the value of Fuel as per the following
criteria
Distance
Fuel
<=1000
500
more than 1000 and <=2000
1100
more than 2000
2200
Public Members
A function FEEDINFO() to allow user to enter values for Flight Number, Destination,
Distance & call function CALFUEL() to calculate the quantity of Fuel
A function SHOWINFO() to allow user to view the content of all the data members

Define a class and WAP to input 5 records in the class named Publisher in C++ with the
following descriptions :
Private members
id
long
title
40 char
author
40 char
price , stockqty
double
stockvalue
double
valcal()
A function to find price*stockqty with double as return type
Public members
a constructor function to initialize price , stockqty and stockvalue as 0
and title as Two states and author as Chetan Bhagat
Enter() function to input the idnumber , title and author
Takestock() function to increment stockqty by N(where N is passed as
argument to this function) and call the function valcal() to update the
stockvalue().
sale() function to decrease the stockqty by N (where N is sale quantity
passed to this function as argument) and also call the function valcal()
to update the stockvalue
outdata() function to display all the data members on the
screen.

Write a program in C++ to create a file , display the file , search for a BookNo from a binary file
BOOK.DAT, assuming the binary file is containing the objects of the following class.
class BOOK
{
int Bno;
char Title[20];
public:
int RBno(){return Bno;}
void Enter(){cin>>Bno;gets(Title);}
void Display(){cout<<Bno<<Title<<endl;}
};

Each node of a STACK containing the following information, in addition to required pointer
field:
Roll no. of the student
Age of the student.
TOP is a pointer to the topmost node of the STACK. Write program for following:
PUSH() TO push a node in to the stack which is allocated dynamically.
POP() Te remove a node from the stack and to release the memory.

Write a program MAX in C++ which will return the Largest number stored in a two dimensional
array of Integers.

class Employee
{
int empcode;
char empname[20];
char empdesig[15];
float empsalary;
public:
void show_emp();
};
Write a program to read file emp1.dat with given information and write only those
records whose designation is manager into emp2.dat.

Copy one text file to another file.

Declares a queue structure


struct NODE
{
int Ticketno;
char PName[20]; //Passenger Name
NODE * NEXT;
};
Write a program to add an element and delete an element in a queue.

Find the occurrence of the word the in a file.

Program to find Row and column sum of an array.

Program to print Upper half of an array.

Program to demonstrate the linear search method of element in an array

This program display the sum of both the diagonal in an array.

Sort an integer array using bubble sort / selection sort / insertion sort

Das könnte Ihnen auch gefallen