nted tries rurrences of a specified character) e a function that finds the number of occurrences of a spec e string using the following header: count (s, ch): xample, count ( "Welcome", 'e') returns 2. The str at method. Implement your function without using the com a test program that reads a string and a character and disp per of occurrences of the character in the string ple Run er a stringi Welcome to Python r a character: o
Q: CREATE A LOG IN AND REGISTRATION FORM IN C++. All text should be centered. Be unique
A: CREATE A LOG IN AND REGISTRATION FORM IN C++
Q: et p> 2 be a prime, g a generator of Z*p. Provide an efficient algorithm which, given x e *p, comput...
A:
Q: What will ALWAYS be the symbol for your current directory in a Linux/Unix terminal?
A: Linux/unix is an open source operating system that directly manages resources through commands. dat...
Q: Write a static recursive method in Java called mRecursiv that displays all of the permutations of th...
A: PROGRAM INTRODUCTION: Start definition of the main function. Declare and initialize the required va...
Q: In terms of machine learning or deep learning algorithms, how is the AI era different from 50 years ...
A: Introduction: In today's environment, new machines and robots are employed to execute tasks or jobs ...
Q: 4. Consider a 64K L2 memory and a 4K L1 4-way associative cache with block sizes of 512. a. How many...
A: Here we calculate the followings terms by using the given information and conclude the answer , so t...
Q: When it comes to linking conditions with actions, a decision table makes things much easier. explain
A: - linking conditions with actions in decision table - decision table are made up of columns which ar...
Q: method, printNumbers, with an integer parameter of any value that is printed as a string. For exampl...
A: Note : Answering in python as no programing language is defined. Input : Integer number Output : ...
Q: Investigate the math library in C and write a function in C called mather which takes a double value...
A: Before going to code we have to add the math library in our header file. Syntax: #include<math.h&...
Q: Eulers number e is used as the base of natural logarithm. It may be approximated using the formula e...
A: NOTE : As the question is not specific about the programming language to be used to write the progra...
Q: In a 64-bit machine, what is the total memory in bytes of 10 integer variables and 5 char variables?
A: Introduction: The total memory in bytes consists of 10 integer variables and 5 char variables.
Q: Create a class calculate that uses two separate functions:-a function to multiply two float numbers ...
A: Introduction The programming methodology for the program is given by: Including header files clas...
Q: Given a variable x of type double. Which one is a valid statement to compute the half of x?
A: All of the above is the correct option a) x*=0.5 => This is multiply and assignment operator....
Q: Why should you check the value of a StreamReader object's EndOfStream property before invoking the R...
A: NOTE :- Below i explain the answer in my own words by which you understand it well. There just ...
Q: What role does a pilot project play in the analysis of information systems? Why do you think Petrie'...
A: Introduction: A system is a collection of linked or interacting pieces that create a coherent entity...
Q: What is the maximum number of processes that can be running at once?
A: Introduction: Because the CPU may only be allocated to one active process at a time, the maximum num...
Q: short answer What does a computer know that a light switch doesn't? Computer science
A: Introduction: Machine language is the only language that a computer can process or execute. In phase...
Q: Q-1. What is at put of this logic gate? A F=?
A: what is the output of the logic gate
Q: With two instances, compare the Spiral model to the Scrum process paradigm.
A: Given: With two instances, compare the Spiral model to the Scrum process paradigm.
Q: Describe how one or more packages can be made available to other applications.
A: Introduction: To make one or more packages accessible to other applications, an import statement wit...
Q: Would you advise using a synchronous or asynchronous bus between the CPU and the memory? Give an exp...
A: Introduction: Bus: A bus is a group of cables that link to one or more subsystems within the same sy...
Q: What is cloud computing? Businesses prefer an external service provider (SaaS, P, Pa, other) because...
A: Answer :
Q: Define the Intel Core i7 cache hierarchy's characteristics?
A: Introduction: The i7's three-level cache structure is described in detail. All three caches are writ...
Q: Because the compiled language does not require computer processing, it is faster. To translate one, ...
A: Introduction: The following are some of the benefits of utilizing a compiled language versus an inte...
Q: ds Explain the term "free software'' or "copyleft'' (as used by Richard Stallman and the Free Softwa...
A: Below the term "free software'' or "copyleft''
Q: Create an input element in HTML that contains a pattern of at least 10 uppercase-only characters, at...
A: Code: <!DOCTYPE html><html><body><form action="/action_page.php"> <label...
Q: What security policy would mitigate the use of no encryption or hashing to regulate data flow and un...
A: Encryption It is the process of sending data in a way that guarantees confidentiality. The encrypti...
Q: mutator and accessor methods for the class's fields. Demonstrate an object of the Customer purchases...
A: Both Answer are Added below:
Q: Determine which characteristics of an algorithm the following procedures have and which they lack. ...
A: Algorithm is a step-by-step process which contains a set of instructions to be executed in a certain...
Q: - Given the value "O×40F40000" represents a single-precision IEEE floating-point number. nswer the f...
A: IEEE 32 bit single precision format is Sign(0) Exponent(8) Mantissa(23) Here bias is +127
Q: Discuss three ways that Swift differs from the C programming language. Describe the role that Swift ...
A:
Q: What is the definition of the word data leakage?
A: Answer :
Q: What occurs when a load instruction reads the byte at address 0x03d4 on the CPU?
A: Introduction: Byte addressability, which highlights the fundamental distinction between memory and s...
Q: Help me please I have a bug in my code
A: As per the requirement issue has been solved with the example code.
Q: What distinguishes the Supercomputer of 2010 from the Supercomputer of today?
A: Supercomputers are fastest high-performance systems available at any given time. Such computers are ...
Q: The following describes what a router does when it receives a packet with an unknown destination net...
A: Introduction: A vulnerability is a flaw in a computer system that a threat actor, such as an attacke...
Q: short answer What is an overlay network? Does it include routers? Computer science
A: Introduction: an overlay network, includes routers, the edges in the overlay network An overlay net...
Q: What are the benefits and drawbacks of bipolar coding schemes? Describe why NRZ coding is unsuitabl...
A: Bipolar: A variant of the RZ code is bipolar return-to-zero (BPRZ) secret writing, wherever the sign...
Q: What's the distinction between NRZ and RZ data? and List the benefits and drawbacks of Manchester co...
A: Introduction: the difference between NRZ and RZ data, and the advantages and disadvantages of Manch...
Q: What is the system of Relocating Symbol References?
A: INTRODUCTION: Relocating Symbol References: As the name implies, this is the symbol that will be rel...
Q: Create a structure flowchart and a Pseudocode that will ask for a year and determine if the inputted...
A: Note: In the question programming language is not mentioned. So here I am completing the program in ...
Q: What is the command for launching an RMI registry?
A: Introduction This question is based on commands on the computer.
Q: Explain how a module can be used in different applications.
A: Introduction: Modules are (package-like) artefacts that include code in any programming language, as...
Q: a. int i = (double) 3; 3.4; b. int i c. int i = ((int) 4..3* 10)/10.0; d. int i (int) 2) Which one i...
A: Type casting means changing a variable from one data type to another data type. In some cases, the c...
Q: 0.100 0.4 0.075- 03 0.050 0.025 8 02 0.000 0.1 -0.025 -0.050 00 -0.075 00 02 04 0. 0.8 10 00 01 03 0...
A: Pair - X and X3 have highest co-relation. And to be more precise the best among these would be X ...
Q: What exactly is HTML? and how does it function?
A: HTML: The full form of HTML is Hypertext Markup Language which is used to create the layout of web p...
Q: In an eye-glass shop, a customer can buy either a pair Ol Sngle prescription sunglasses. On each pai...
A: Since no programming language was mentioned in the question, I have solved in C language.
Q: What exactly does IBM do?
A: Introduction: IBM IBM is an abbreviation for International Business Machines Corp.
Q: 6. What is the MARIE instruction for the following register transfer language (RTL): MAR + X MBR + M...
A: Register Transfer Language (RTL)In symbolic notation, it is used to describe the micro-operations tr...
Q: We need to use the java language
A: I have provided JAVA CODE along with CODE SCREENSHOT and 4 OUTPUT SCREENSHOTS-------------...
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
- 1. What does the following code segment return assuming the argment passed is a single word or short phrase def mystery3(word: str) -> str:output = ""for char in word:output = char + outputreturn output 2. Write a function called removeVowels that accepts a string as a parameter and return a copy of that string with no vowels (aeiou) in it. Upper case and lower case vowels will be remove and the rest of the string is not changed. For example removeVowels("The Quick Brown Fox) would return "Th Qck Brwn Fx"I need a function that takes a string and returns initials such as Bob Burnett becoming B.B. string CreateAcronym(string userPhrase);int main() {while (true){string userPhrase;getline(cin, userPhrase); if (userPhrase == "") {break; }cout << CreateAcronym(userPhrase) << endl;}return 0;}string createAcronym( const string && userPhrase ) {int i;string acronym;bool use_next = true; for (i=0; i < userPhrase.size(); i++){char character = userPhrase.at(i);int ascii = (int)character;if(ascii > 64 && ascii < 91 && use_next == true){acronym += character;use_next = false;} else if(ascii == 32){use_next=true;}else{use_next = false;}}return acronym;} Please fix my program using c++.Write a C function countWords() that takes a string as parameter, finds and returns the number of word in the string. Word is a group of consecutive alphanumeric characters. "CS363" "C3PO". Prototype: int countWords(char str[]); ps: please do not copy paste from chegg or anywhere else. write unique code
- C++ is my answer correct ? Write a function to convert a given string : Answer: #include <iostream> #include <string> using namespace std; void toUpper(string &str) { for (int i = 0; i < str.length(); i++) { str[i] = toupper(str[i]); } } void toLower(string &str) { for (int i = 0; i < str.length(); i++) { str[i] = tolower(str[i]); } } int main() { string str = "khaled"; toUpper(str); cout << str << endl; str = "MOHAMMED"; toLower(str); cout << str << endl; return 0; } Write a function to calculate the sum of the even number from 1 - 100. Answer: #include <iostream> using namespace std; int sumEven() { int sum = 0; for (int i = 1; i <= 100; i++) { if (i % 2 == 0) { sum += i; } } return sum; } int main() { cout << sumEven() << endl; return 0; }Please fill the blanks for C. /*getchar VS scanf*/ #include<stdio.h> #define length 70 //Putting all function headers to top __1__ print_scanf(); __2__ print_getchar(); int main() { //print 2 sentences using getchar() for(int i = 0; i < 2; i++) { print_getchar(); } //print 2 sentences using scanf() for(int i = 0; i < 2; i++) { print_scanf(); } return 0; } //Function to print using getchar void print_getchar() { __3__ str[__4__]; //create a string called str with length defined above printf("Enter your sentence for getchar:"); int i = 0; while(1) //run forever,unless there's a break or return { /*save user's input to curChar since we need to check 2 cases: Case 1. if the inputted character is a letter we save curChar to our string (array of char) Case 2. if it's a new line character.…There are three types of edits that can be performed on strings: insert a character,remove a character, or replace a character. Given two strings, write a function to check if they areone edit (or zero edits) away.EXAMPLEpale, ple -> truepales, pale -> truepale, bale -> truepale, bae -> false
- C++ is my answers correct ? Write a function to convert a decimal number to a binary number. Answer: #include <iostream> #include <string> using namespace std; string decToBin(int dec) { string bin = ""; while (dec > 0) { bin = to_string(dec % 2) + bin; dec /= 2; } return bin; } int main() { cout << decToBin(10) << endl; return 0; } Write a function to calculate s =1!+2!+3!+....+10! Answer: #include <iostream> using namespace std; int findFactSum(int n) { int f = 1, Sum = 0; for (int i = 1; i <= n; i++) { f = f * i; Sum += f; } return Sum; } int main() { int n = 10; cout << findFactSum(n); return 0; }This function should reverse the words in a string. A word can be considered to be any characters, including punctuation, separated by spaces (only spaces, not tabs, \n etc.). So, for example, if s is “The Giants won the Pennant!” the function should change s to “Pennant! the won Giants The” void reverseWords(char *s)Create a function that takes a number (int) and returns a corresponding string of dashes. Examples: num_to_dashes(1) ➞ "-" num_to_dashes(5) ➞ "-----" num_to_dashes(3) ➞ "---"
- is it correct ? Write a function to change all the upper case to lower case in a given string. Answer: #include <iostream> #include <string> using namespace std; string toLowerCase(string str) { for (char& c : str) { if (isupper(c)) { c = tolower(c); } } return str; } int main() { string str = "HI, MY NAME IS KHALED MOHAMMED!"; cout << toLowerCase(str) << endl; return 0; }4. Complete the function show_upper. This function takes one parameter - a string (s). It should return a string made up of all the upper-case characters in s. For example, if s is “aBdDEfgHijK” then show_upper should return “BDEHK”. It should return the upper-case string - not print it. Do not change anything outside show_upper.• R7.17Consider the following code that repeats a C++ string three times. string a = "Hello"; string b = a + a + a; Suppose s is a C string, and t is declared as char t[100]; Write the equivalent code for C strings that stores the threefold repetition of s (or as much of it as will fit) into t.