Lab Strings.pdf

  • Uploaded by: Abdul Rehman
  • 0
  • 0
  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Lab Strings.pdf as PDF for free.

More details

  • Words: 263
  • Pages:
LAB : STRINGS

1) Write a program that converts all lowercase characters in a given string to its equivalent uppercase character. 2) Write a program that extracts part of the given string from the specified position. For example, if the sting is "Working with strings is fun", then if from position 4, 4 characters are to be extracted then the program should return string as "king". Moreover, if the position from where the string is to be extracted is given and the number of characters to be extracted is 0 then the program should extract entire string from the specified position. 3) Write a program that converts a string like "124" to an integer124. 4) Write a program that replaces two or more consecutive blanks in a string by a single blank. For example, if the input is Grim return to the planet of apes!! the output should be Grim return to the planet of apes!! 5) Write a program to delete all vowels from a sentence. Assume that the sentence is not more than 80 characters long.Write a program that will read a line and delete from it all occurrences of the word ‘the’.

6) Write a program that takes a set of names of individuals and abbreviates the first, middle and other names except the last name by their first letter. 7) Write a program to count the number of occurrences of any two vowels in succession in a line of text. For example, in the sentence “Pleases read this application and give me gratuity” such occurrences are ea, ea, ui.

Related Documents

Lab
May 2020 22
Lab
June 2020 19
Lab
April 2020 14
Lab
July 2020 11
Lab
October 2019 51
Lab
May 2020 32

More Documents from ""

Process Flow Diagram.docx
December 2019 30
Matriq.docx
November 2019 25
Lab Strings.pdf
June 2020 14
Chapter 21.pdf
November 2019 17