Marketing

Submitted by: Submitted by

Views: 138

Words: 807

Pages: 4

Category: Other Topics

Date Submitted: 07/22/2013 11:49 PM

Report This Essay

Aum Sai Ram

6th June 2013

Basic Programs for practice…………

pls complete as many as possible … and submit the programs/codes in a folder by your name b4 nex weekend (Saturday, 15th june 2013).

1) Write a program to obtain the transpose of an n x n matrix

Transpose of a matrix is obtained by exchanging the elements each row with

the elements of the corresponding column.

2) Write a program that will print out all the rotations of a string typed into it.

For eg. The rotations of the word “SPACE” are

SPACE PACES ACESP CESPA ESPAC

3) Write a program to delete all vowels from a sentence.

4) Write a program which will read a line and finds all the occurances of the word

“the”. Replace “the” by “sai” and display the modified line.

5) Write a program to count the number of occurances of any two vowels in succession

in a line of text.

For Eg., in the sentence: “Please read the application and give me gratuity”

Such occurances are ea, ea, ui

6) Write a program using structures

Take in Names of ‘N’ students and arrange them according to alphabetical order.

7) Write a program that, for all positive integers i, j, k and l from 1 to 1000.

finds and prints all combinations of i, j, k and l such that i+j+k = l and i < j < k < l.

8) Write a program which modifies upper case letters in a file to lower case letters.

(dont use any lib functions)

9) Write a function to reverse a character string.

Use it to write a program that reverses its input a line at a time.

10) . Write a program to reverse each of the words in a given sentence.

(ask the user for a sentence)

11) . Use structures to add two fractions together.

12) . Write an interactive program with the options to

count the number of characters in a string,

concatenate two strings,

find...