Question: Part A. Character array and string. 1. Declare a char array called str1 and initialize it to this is the first string. using this method:

 Part A. Character array and string. 1. Declare a char array

Part A. Character array and string. 1. Declare a char array called str1 and initialize it to "this is the first string." using this method: 't', 'h', 'i', 's''', 'i', .. . 10') 2. Declare a char array called str2 and initialize it to "this is the second string." using this method: "this is the second string"; 3. Declare a char array called str3 of size 100 and leave it un-initialized 4. Use the scanf function to initialize str 3 from the keyboard. (Note: use %s as the formatting character for string) 5. Use printf to print all the string:s 6. Declare a pointer variable named pStr and initialize it to point to str3. 7. Display the contents of str3 using pStr; do not use subscripts Part B. Letter Analysis 1. Write a function called letterAnalysisthat takes as input parameter a null (i.e '\0') terminated string line, where line would contain an English sentence. 2. The function prints a table indicating the number of occurrences of each letter (uppercase or lowercase) of the alphabet in the input string 3. The function returns a void type For example: char str[] = "This IS a test."; letterAnalysis (str); would print the following Total letter counts: 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!