Yours progarm allows users enter a long string 'o' and a short string 'p'. The system finds the occurrences of 'p' in 'o' and replaces them by the reversed of 'p'. It then prints out the modified string 'o'.
Q: 1. Find the incorrect/missing parts and correct them. Program Answers #include int main(void); int…
A: The given code has some errors and some missing parts. I have modified the code accordingly.
Q: Explain the difference between the statements on the left and the statements on the right For each…
A: Group 1 has the Switch Case Statements whereas Group 2 has the If else Statements- In Switch Case…
Q: Q? Which one of the following expressions does not evaluate to 3? a. 2+ 16 % 5 b. 7 - 15/ 4 C. 6 * 5…
A: Option a. 2 + 12 % 6 and b. 7 - 15 / 4 does not evaluate to 3 and here below are the implemented…
Q: 5.18 (Even or Odd) Write a program that inputs a series of integers and passes them one at a time to…
A: EXPLANATION - Firstly declare variables that are used in program . Then take input from user about…
Q: Q1) Write a C program that calculates the given output parameters for the serial and parallel…
A: Note: This code should be rewritten instead of copying to the compiler otherwise it will throw a…
Q: The electric company charges according to the following rate schedule: 9 cents per kilowatt-hour…
A: Conditional Statement in Programming: In programming, conditional or decision-making statements can…
Q: Write a program to process a collection of daily high temperatures. Your program should count and…
A: Required:
Q: Write a function named(difference), that accepts an integer one-dimensional array and its size,…
A: The programming methodology is given by: Including header files Difference function that takes 1d…
Q: Question 10: In c language. Take input an integer n from user and then take input n? integers, store…
A: Given: An integer n followed by n2 matrix which are member of an n*n 2-D array. Requirement- Print…
Q: Two words are anagrams if they are formed by rearranging the letters of another, such as cinema,…
A: Step 1 The code is given in the below step
Q: Write a program that declares two arrays of integers. Fill the first one from the user and the…
A: As per guidelines, we are supposed to answer only one question. Kindly repost other question as a…
Q: 5. Use the given Taylor Series Expansion on Cosine and Sine function cos z E(-1)" (2n)! sin z E…
A: Algorithm: Start Read x and n value Set m=x Set x = x*(3.1415/180) Implement caculateSin() which…
Q: SET A Develop a self-service laundry calculator that reads laundry weight and drying time as inputs…
A: Please refer to the following steps for the complete solution to the problem above.
Q: 1. Write a program in C to create a singly linked list of n nodes and display it in reverse order.…
A: To write: To write a program in C to create a singly linked list of n nodes and display it in…
Q: Lab Work 2 In this lab work, you will implement a coffee shop example. In this coffee shop,…
A: To create: To write a menu-driven C program for a coffee shop that asks the user the number of…
Q: If num is a variable of type int and temp is a ariable of type double, how could you correctly…
A: scanf()is a function defined in preprocessor library stdio (standard input output). Scanf() is used…
Q: Open Code Block IDE, create a new project. Use this project to: o Create a function named…
A: #include <stdio.h>#include<time.h>#include<stdlib.h>void rand_array(int a[],int…
Q: 2-) Write C program to dispense change. The user enters the amount paid and the amount due. The…
A: (1)Read the amountPaid and amountDue (2)Ensure enough amount is paid to get the change (3)Call the…
Q: Specify whether the following identifiers are valid or invalid SUV &xy tax2020 7_8 scanf UFO tch 125…
A: Identifiers are the words defined by the user. There are certain rules for constructing them.…
Q: Р-p/44 45%z XX-128х t%2.2 Specify whether each expression is valid or not. All variables are int and…
A: p-p/44 This is a valid expression in C. The result will also be an integer value.
Q: Input: 8 8 is in the series so the output will be Output: YES Input The input will be a single-line…
A: Step-1: StartStep-2: Declare a variable num and take input from userStep-3: Call function…
Q: 6.10 (Sales Commissions) Use a single-subscripted array to solve the following problem: A…
A: Dear Student, The source code of the program is given below. The program has been Implemented using…
Q: Determine the output of the following program: int main() int x=3,y=4,z=6; int *p1,*p2,*p3; p1=&x;…
A: Requirement- Determine Output of Following program Solution- Pointer variables store the address of…
Q: 1. In the code editor, you are provided with a main() function that asks the user for 2 integers.…
A: The given main function is: int main(){ int a, b; printf("Enter Integer 1: ");…
Q: Considering the following declarations Q? а, b, с, d; double w, х, у ,2; int a=10 ; b=5 ; c=1 ; d=2…
A: #include <stdio.h> int main(){ int a,b,c,d; double w,x,y,z; a=10; b=5; c=1;…
Q: Write a recursive function that performs the following operations. 1- It will get the last 10 digits…
A: below is the c program
Q: Write a C function to print out the values of a given minimum heap with n elements implemented by…
A: Here the Min heap is used to insert the elements and the heap Sort is used to sort the elements in…
Q: Constraints All characters are alphabetical characters and a certain character won't exist more than…
A: We need to write a c program to find unique characters of 2 arrays.
Q: Write a program to print the result of the multiplication of two numbers that the user entered.…
A: I have given an answer in step 2.
Q: SET D Develop a souvenir price calculator program that reads product code and numbe product as…
A: We are given information , according to which we have to develop a souvenir price calculator program…
Step by step
Solved in 4 steps with 4 images
- Word Separator Create an application that accepts as input a sentence in which all the words are run together but the first character of each word is uppercase. Convert the sentence to a string in which the words are separated by spaces and only the first word starts with an uppercase letter. For example, the string "StopAndSmellTheRoses." would be converted to "Stop and smell the roses."Write an application that accepts three Strings from the user and displays them in alphabetical order without regard to case.Unique Answer plzz
- color: one of the following strings: 'red', 'blue', 'silver', 'white', 'black'year: year of manufacturing. A number between 1990 and 2018company: one of the following strings: 'Honda', 'Toyota', 'Ford', 'Chevrolet'model: one of the following strings: 'sedan', 'hatchback', 'SUV'Give a logical expression that evaluates to a True or False for a set of cars. e.g. Expression for "Red SUV cars" is (color == "red" and model == "SUV") Give an expression for "Ford sedan cars that are red or blue and were manufactured after 2000"In the class String, the substring method inserts a String into another String. -True or -FalseThis string method returns a copy of a string with all the alphabetic letters converted to uppercase.a. uppercase()b. case_upper()c. upper()d. to_upperCase()
- Name format: You must use String object and not StringBuffer or StringBuilder. Many documents use a specific format for a person's name. Write a program that take one Line as an input. Example: Scanner input = new Scanner(System.in); System.out.println(“Enter firstName middleName lastName separated by at least one blank, It may have more than one blank separating firstName middleName lastName."); Input sample : Pat Silly Doe || Note these are separated by at least one blank. String line = input.nextLine() Ex: If the input is: Pat Silly Doe the output is: Doe, P.S. If the input has the form: firstName lastName the output is: lastName, firstInitial. Ex: If the input is: Julia Clark the output is: Clark, J. Please submit the .java source file and the sample run in a text file. ThanksJAVA PPROGRAM ASAP Please create this program ASAP BECAUSE IT IS MY LAB ASSIGNMENT so it passes all the test cases. The program must pass the test case when uploaded to Hypergrade. Chapter 9. PC #2. Word Counter (page 608) Write a method that accepts a String object as an argument and returns the number of words it contains. For instance, if the argument is “Four score and seven years ago” the method should return the number 6. Demonstrate the method in a program that asks the user to input a string and then passes it to the method. The number of words in the string should be displayed on the screen. Test Case 1 Please enter a string or type QUIT to exit:\nHello World!ENTERThere are 2 words in that string.\nPlease enter a string or type QUIT to exit:\nI have a dream.ENTERThere are 4 words in that string.\nPlease enter a string or type QUIT to exit:\nJava is great.ENTERThere are 3 words in that string.\nPlease enter a string or type QUIT to exit:\nquitENTERState true or false: A regular expression enables a quick test to determine objects and text strings with undependable values.