Make your own free website on Tripod.com

Topic 6 - Sample Questions - Strings (5 days)

 

            

1. Write a program that will let you enter your whole name and will then print it out in reverse order.

2. Write a program that will let you enter your name and will then tell you how long it was. (including spaces)

3. Write a program that will let you enter your whole name and will then print out your first name only.

4. Write a program that will let you enter your whole name and will then print out your last name only.

5. Write a program that will let you enter a sentence and will then print out every other letter.

6. Write a program that will let you enter your name and will then print every other letter in reverse order.

7. Write a program that will let you enter a sentence, then enter a letter and will then tell you how many times that letter was in the sentence.

8. Write a program that will let you enter a sentence and will then print out the sentence without any vowels.

9. Write a program that will let you enter a word and will then print the word in a right triangle.

     EX. Enter name tom

       t

       to

       tom

10. Write a program that will let you enter a full name and will then print out first name in reverse order.

11. Write a program that will let you enter a string and then will tell you how many vowels were in it.

12. Write a program that will let you enter a sentence and will then tell you how many words were in the sentence. 

 

 

 

 

 

   

 


HOME