mpvm ganga gurukulam c.s. - · pdf filewrite a menu driven program which allows the user to...

21
MPVM Ganga Gurukulam C.S. - Practical 2017 Experiment No: 11 Write a program to input the name of a text file (ABC.TXT) from the user and display: a) The number of blanks present in the file. b) The number of lines present in the file. c) The number of capital alphabets present in the file. d) The number of small alphabets present in the file.

Upload: vuongngoc

Post on 22-Mar-2018

216 views

Category:

Documents


3 download

TRANSCRIPT

MPVM Ganga Gurukulam C.S. - Practical 2017

Experiment No: 11

Write a program to input the name of a text file (ABC.TXT) from the user and display: a) The number of blanks present in the file. b) The number of lines present in the file. c) The number of capital alphabets present in the file. d) The number of small alphabets present in the file.

MPVM Ganga Gurukulam C.S. - Practical 2017

MPVM Ganga Gurukulam C.S. - Practical 2017

Experiment No: 12

Write a program to input elements in a 2D array and then display this array in matrix form.

Show the sum of each row of the matrix.

MPVM Ganga Gurukulam C.S. - Practical 2017

MPVM Ganga Gurukulam C.S. - Practical 2017

Experiment No: 13

Write a program to input elements in a 2D array and then display the sum of main diagonal

elements of the array.

MPVM Ganga Gurukulam C.S. - Practical 2017

MPVM Ganga Gurukulam C.S. - Practical 2017

Experiment No: 14

Write a menu driven program which allows the user to perform the following operations on a stack (Array implementation): 1) Push 2) Pop 3) Display

MPVM Ganga Gurukulam C.S. - Practical 2017

MPVM Ganga Gurukulam C.S. - Practical 2017

Experiment No: 15

Write a menu driven program which allows the user to perform the following operations on a queue (Array implementation): 1) Insert 2) Delete 3) Display

MPVM Ganga Gurukulam C.S. - Practical 2017

MPVM Ganga Gurukulam C.S. - Practical 2017

Experiment No: 16

Write a menu driven program which allows the user to perform the following operations on a stack (Linked implementation): 1) Push 2) Pop 3) Display

MPVM Ganga Gurukulam C.S. - Practical 2017

MPVM Ganga Gurukulam C.S. - Practical 2017

Experiment No: 17

Write a menu driven program which allows the user to perform the following functions on a queue (Linked implementation): 1) Insert 2) Delete 3) Display

MPVM Ganga Gurukulam C.S. - Practical 2017

MPVM Ganga Gurukulam C.S. - Practical 2017

Experiment No: 18

Write a menu based program using array to merge to array of size M & N into third array using

following methods on the basis of user’s choice.

Two 1 D Array and Merge into third 1 D array

MPVM Ganga Gurukulam C.S. - Practical 2017

MPVM Ganga Gurukulam C.S. - Practical 2017

Experiment No: 19

Write a function in C++ which accepts an integer array and its size as arguments/parameters and add 10 to the elements at even position and add 5 to the elements at odd position. Example: If an array of eight elements has initial contents as

2,4,1,6,7,9,23,10 The function should rearrange the array as

5,14,6,16,12,19,28,20

MPVM Ganga Gurukulam C.S. - Practical 2017

MPVM Ganga Gurukulam C.S. - Practical 2017

Experiment No: 20

Write a program to input integer data in two arrays. Sort one of the arrays in ascending

order and the other in descending order. Then merge them into a third array so that the

data in the third array is in ascending order. The program should then display the data from

all the three arrays.

MPVM Ganga Gurukulam C.S. - Practical 2017

MPVM Ganga Gurukulam C.S. - Practical 2017