Writing a C program using arrays and strings that asks the user to enter a name and counts the number of letters in the input.
Added by Jay C.
Step 1
First, we need to declare an array to store the user's input name. We can declare an array of characters with a fixed size, say 50. Show more…
Show all steps
Your feedback will help us improve your experience
Shaik Dadasaheb and 52 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Write a C++ program that reads a file input.txt and counts and displays the number of alphabets in it. Example: Input1.txt: good day sir Output: number of alphabets: 10
John B.
C programming, Counting numbers and words Write a program that counts how many words and numbers are in a given line. Input: There are at most 1000 data sets. Each data set consists of numbers and words (letters 'a'-'z' and 'A'-'Z') separated by spaces. Output: The number of numbers and words in each line. Example Input: Dato has 2 cats and 3 dogs 2 plus 2 is equal to 4 Output: 2 5 3 4
Supreeta N.
QUESTION 1: Write a C program to take a string from the user consisting of one or more words separated by a single space, where each word consists of English letters, and store in a string title. Capitalize the string title by changing the capitalization of each word such that: If the length of the word is 1 or 2 letters, change all letters to lowercase Note: title consists of words separated by a single space without any leading or trailing spaces. Each word consists of uppercase and lowercase English letters and is non-empty. Otherwise, change the first letter to uppercase and the remaining letters to lowercase. Return the capitalized title QUESTION 2: What is the time complexity of capitalizing the string title of length n? Explain.
Aarya B.
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD