Sunday, September 21, 2014

Day 5 - 2: Character array

1. Write a program which prints the letters in a char array in reverse order. For
example, if the array contains {'c', 's', 'c', '2', '6', '1'}the output (to the terminal)
should be "162csc"


2. Write a  program : declare a char array and the size of the array (of type char). This function counts the number of digit letters in the char array.


3. Write a program that counts the number of words in a string


4. Write a program that accept two string, after checking if string1 equals string2 then print 'string 1 equals string2', else print string1 less than or greater than string 2.

5. Write a function that scans a character array for the character - and replaces it with _

No comments:

Post a Comment