Programming in C
4th Edition
ISBN: 9780321776419
Author: Stephen G. Kochan
Publisher: Addison-Wesley
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 9, Problem 13E
If c is a lowercase character, the expression
C
produces the uppercase equivalent of c, assuming an ASCII character set.
Write a function called u that converts all lowercase characters in a string into their uppercase equivalents.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Using c++, Write a function that accepts a string "s" and returns the character in the string with the largest ascii value
If c is a lowercase character, the expression
c – 'a' + 'A'
produces the uppercase equivalent of c, assuming an ASCII character set.
Write a function called uppercase() that converts all lowercase characters in a string into their uppercase equivalents.
Write the following function to check whether a string is a palindrome assuming letters are case-insensitive:
bool isPalindrome(const string& s)
Write a test program that reads a string and displays whether it is a palindrome.
Chapter 9 Solutions
Programming in C
Ch. 9 - Type in and run the 11 programs presented in this...Ch. 9 - Prob. 2ECh. 9 - Write a function called s to extract a portion of...Ch. 9 - Write a function called f to determine if one...Ch. 9 - Write a function called r to remove a specified...Ch. 9 - Write a function called i to insert one character...Ch. 9 - Using the f , r , and i functions from preceding...Ch. 9 - Extend the s function from Program 9.11 so that if...Ch. 9 - Write a function called s that converts a...Ch. 9 - If c is a lowercase character, the expression C...
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
Modify the definition of the class Species in Listing 5.19 of Chapter 5 by removing the method setSpecies and a...
Java: An Introduction to Problem Solving and Programming (7th Edition)
A file that contains a Flash animation uses the __________ file extension. a. .class b. .swf c. .mp3 d. .flash
Web Development and Design Foundations with HTML5 (8th Edition)
What populates the Smalltalk world?
Concepts of Programming Languages (11th Edition)
A(n) _______ is a set of instructions that a computer follows to perform a task. a. compiler b. program c. inte...
Starting Out with Programming Logic and Design (4th Edition)
A program has a float variable named total and a double variable named number. Write a statement that assigns n...
Starting Out with Java: From Control Structures through Objects (7th Edition) (What's New in Computer Science)
What is pseudocode?
Starting Out With Visual Basic (8th Edition)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Convert int to string without the itoa function. This is C programming.arrow_forwardWrite a function that converts a floating-point number to a C-String using the following header: void ftoa(double f, char s[]) Write a test program that prompts the user to enter a floating-point number and displays each digit and the decimal point separated by a space.arrow_forwardCreate a function that determines whether a string is a valid hex code. A hex code must begin with a pound key # and is exactly 6 characters in length. Each character must be a digit from 0-9 or an alphabetic character from A-F. All alphabetic characters may be uppercase or lowercase. Examples isValidHexCode ("#CD5C5C") → true isValidHexCode("#EAECEE") → true isValidHexCode ("#eaecee") → true isValid HexCode ("#CD5C58C") → false // Length exceeds 6arrow_forward
- Using C language, write code that solves the following problem. Have the user enter a string that is at most 100 characters long. Count how many space characters ' ' are within the string.arrow_forward(Program) Using the at() function, write a C++ program that reads in a string by using getline() and then displays the string in reverse order. (Hint: After the string has been entered and saved, retrieve and display characters, starting from the end of the string.)arrow_forwardWrite a program that reads in a line consisting of a students name, Social Security number, user ID, and password. The program outputs the string in which all the digits of the Social Security number and all the characters in the password are replaced by x. (The Social Security number is in the form 000-00-0000, and the user ID and the password do not contain any spaces.) Your program should not use the operator [] to access a string element. Use the appropriate functions described in Table 7-1.arrow_forward
- Write a function that counts the number of letters in a C-string using the following header: int countLetters(const char s[]) Write a test program that reads a C-string and displays the number of letters in the string.arrow_forward***IN PSUEDOCODE ONLY - not a real programming language!!*** Question:A prime number is a number that is only evenly divisible by itself and 1. For example, the number 5 is prime because it can only be evenly divided by 1 and 5. The number 6, however, is not prime because it can be divided evenly by 1, 2, 3, and 6. Design a Boolean function called isPrime, that accepts an integer as an argument and returns True if the argument is a prime number, or False otherwise. Use the function in a program that prompts the user to enter a number and then displays a message indicating whether the number is prime. The following modules should be written: - getNumber, that accepts a Ref to an integer, prompts the user to enter a number, and accepts that input - isPrime, that accepts an integer as an argument and returns True if the argument is a prime number, or False otherwise - showPrime, that accepts an integer as an argument , calls isPrime, and displays a message indicating whether the…arrow_forwardCreate a function which replaces all the x's in the string in the following ways: Replace all x's with "cks" UNLESS: The word begins with "x", therefore replace it with "z". The word is just the letter "x", therefore replace it with "ecks". Examples xPronounce ("Inside the box was a xylophone") → "Inside the bocks was a zylophone" xPronounce ("The x ray is excellent") "The ecks ray is eckscellent" xPronounce ("OMG x box unboxing video x D") → "OMG ecks bocks unbocksing video ecks D"arrow_forward
- Create a function which replaces all the x's in the string in the following ways: Replace all x's with "cks" UNLESS: The word begins with "x", therefore replace it with "z". The word is just the letter "x", therefore replace it with "ecks". Examples xPronounce("Inside the box was a xylophone") → "Inside the bocks was a zylophone" xPronounce ("The x ray is excellent") → "The ecks ray is eckscellent" xPronounce ("OMG x box unboxing video x D") ➡ "OMG ecks bocks unbocksing video ecks D" Solve with Java Scriptarrow_forwardCreate a function that takes in a sentence as input and returns the most common last vowel in the sentence as a single character string. Examples common Last Vowel ("Hello World!") → "0 common Last Vowel ("Watch the characters dance!") → "e" common Last Vowel("00I UUI EEI AAI") → "i" Notes There will only be one common last vowel in each sentence. • If the word has one vowel, treat the vowel as the last one even if it is at the start of the word. The question asks you to compile all of the last vowels of each word and returns the vowel in the list which appears most often. ● y won't count as a vowel. • Return outputs in lowercase.arrow_forwardCode in python You have a triplet of strings, X, Y, Z, where each string is consisting of lowercase characters. You are interested in counting the number of ordered triplet of strings such that Str. Stry, and Str3 are non-empty substrings of X, Y, and Z, respectively Str + Str₂+ Str3 is a palindromic string, with '+' denoting the string concatenation operator. Note that 2 triplets are considered to be different if any substring chosen from a string in 1 triplet is different from the substring chosen from the same string in other triplet. • Test "aaa", "bbb", "aba", "bab", "abba", "baab" are all possible palindromic strings. • Test: "aaa", "bbb", "aba", "bab", "abba", "baab", "babab", "ababa" are all possible palindromic strings. Input-4,a,b,c ab ,ba,ab ab,ab,ab,ab,aa,aa,aa(all have line space) Output -0,6,8,27arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
What Are Data Types?; Author: Jabrils;https://www.youtube.com/watch?v=A37-3lflh8I;License: Standard YouTube License, CC-BY
Data Types; Author: CS50;https://www.youtube.com/watch?v=Fc9htmvVZ9U;License: Standard Youtube License