Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Someone please help me code this! Due date Monday lab: 20/04/2018 23:59, all other labs: as specified in the submission link. Description Develop a C

Someone please help me code this!image text in transcribed

Due date Monday lab: 20/04/2018 23:59, all other labs: as specified in the submission link. Description Develop a C program to a read a word as input from the keyboard and output whether the word contains duplicate letters Your program must display any duplicate letters and their number of occurrences in the same order as they appear in the input. Hint: You may reuse the C function you developed in Lab 4 Task 6, that checks if a string is a palindrome, with modifications. Hint: You might need to maintain a counter variable and a char array for the already checked duplicate characters in the word. Hint: You may assume that one word cannot have more than 15 characters. Sample run A sample run of the program if the user input was "programme" is as follows: Enter a word> programme Duplicate letter: r, occurrences: 2 Duplicate letter: m, occurrences: 2 Another sample run of the program if the user input was "abracadabra" is as follows: Enter a word> abracadabra Duplicate letter: a, occurrences 5 Duplicate letter: b, occurrences: 2 Duplicate letter: r, occurrences: 2 If the word has no duplicate characters the output should be as follows. Enter the word> phone No duplicates found

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions