Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

Part A. Character array and string. 1. Declare a char array called strl 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 strings 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 letterAnalysis that 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: b: 0 d: 2 f: 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

2. Identify issues/causes for the apparent conflict.

Answered: 1 week ago