Question 2 Let say an Array consist of String names as follow: [i] [0] [1] [2] [3] [4] [5] [6] String John Martha Alex Cindy Roland Susan Didie (a) Write a code that can Search for array location (1) of "Roland" in the array Example output: Enter Name: Roland Searching... Result: The Name is at [4] (b) Write a code that can Sort the array in alphabetical order. Example output: Current Names in Arrays: John. Martha..... etc Sorting... Sorted Names: Alex......
Q: Suppose you are an astrologer and you are predicting the zodiac sign of the customer using month and…
A: #include <stdio.h>#include <string.h> int main(){ // declare variables int…
Q: The shrink to fit allows you to .. A. Combine two document B. Adjust the text in page C.…
A: MS Excel is one of the most commonly used tools in any fields especially data analysis. It is very…
Q: Using 8-bit representation, what is the 2’s complement of the result of ((45 base 10) + (44 base…
A: We have , First Number = 4510 Second Number = 4410 Now , performing the addition of…
Q: What do you think the limits of an organization's data security are? What are the earliest and…
A: Data security is a practice that protects digital information from unauthorized access, damage, or…
Q: what will be the value of the variable A at the end of the loop? int A; for(A=8; A>=3; A -= 2)…
A: Given lines of code is, int A; for(A=8;A>=3;A-=2) printf("%d",A); Here the integer variable A…
Q: What is the purpose of rectangular and jagged arrays?
A: answer:
Q: How can you recognise the difference between the four most common types of information systems…
A: Let's see the solution in the next steps
Q: Name four categories of loT topologies.
A: IoT:- Internet of Things, is often referred to the collective network of devices which are connected…
Q: In order to understand a basic algorithm, one must first define it.
A: An algorithm is a step-by-step procedure that defines a set of instructions that must be executed in…
Q: Write the - (a*b)+(c + d) - (a + b +c+d). quadruple for the expression,
A: Expression -(a*b)+(c + d)-(a+b+c+d)
Q: It is possible to share a MAC address across two network interfaces, but how? Do you know why this…
A: The question has been answered in step2
Q: A user interface can be quite restrictive. For example, the interface design might not allow a user…
A: The answer is as follows
Q: 2. Assuming that the set of possible list values is {1, 2, 3, 4, 5}, use the distribution- counting…
A:
Q: Which firewall architecture is most popular among businesses today?Why? Explain.
A: Introduction: A firewall is a device that filters traffic on a network in order to fulfil…
Q: What ethical issues does Big Data raise?
A: Introduction: Big data refers to the massive amount of information, both structured and…
Q: Ques-1 explain The Bagging algorithm and it's steps to perform it.
A: Question has asked to explain Bagging algorithm and it's steps.
Q: The purpose and objective of an auditor is to form opinions on whether the operations of an entity…
A: Documentation is important because key decisions about how the audit will be performed are contained…
Q: When a software, such as Microsoft Word, chooses to write to a file, briefly explain the transitions…
A: A processor in a computer running Windows has two different modes: 1.User mode and 2.Kernel mode.…
Q: Complete the following Incomplete LMC program by filling out the vacant mailboxes. The program…
A: Complete the following Incomplete LMC program by filling out the vacant mailboxes. The program…
Q: Problem 4. BFS and DFS Trees. Let G be a connected graph with the property that both BFS and DFS…
A: Below is the answer to above question. I hope this will be helpful for you...
Q: In Java, which Scanner method reads only one word?
A: The question has been answered in step2
Q: What are the benefits and downsides of dispersed data processing that should be considered while…
A: The range is the difference between the data's largest and smallest observations. The primary…
Q: 4. Make a program to solve and display factorial of a number. Use While-Loop or Do-While Loop.
A: The question has been answered in step2
Q: 1. Which of the following is the absolute value of the negative number 110110112, expressed in 2's…
A:
Q: a. [LO1 & L02, 20 points] Given AVL Tree in Figure 1. Simulate nodes in the tree by using the given…
A: The nodes in the tree by using the given insert operations are: insertion of 25 insertion of 10…
Q: What is the starting address of the last double element in aValues?
A: As per Bartleby guidelines “Since the given question contains multiple questions, we will only solve…
Q: In the OSI Model, what is peer-to-peer communication?
A: Introduction: The OSI Reference Model strives towards peer-to-peer communication.
Q: make me a simple program with the application of control structures, functions and arrays about the…
A: Structure which is also called as structs are the way to group the several related variables in one…
Q: Code in a sequence structure and code in a decision (if) structure are distinct.
A: Sequence Structure: A sequence structure may include one or more sub diagrams, sometimes known as…
Q: FIX THIS CODE Using python Application CODE: import csv playersList = [] with…
A: In this above code
Q: 242424
A: 42424241
Q: In c# visual studio add a windows form and run stored procedure using parameters. Please write…
A: In c# visual studio add a windows form and run stored procedure using parameters. Please write…
Q: What should be written in Q4? (computeTrainCost, fare calculation 2) OfDistance = 31.33 * fDistance;…
A: If we consider above function we can see that return type is float and its calculating train cost…
Q: Using office clipboard, you can .. A. Only store one item at a time in the clipboard B. Store up…
A: answer starts from step 2
Q: It is possible to build a wireless network on top of existing telecommunications infrastructure. In…
A: Introduction: Base stations (BSs) and access points (APs) are examples of infrastructure devices…
Q: Is there a way to leverage regions and availability zones to increase application resilience,…
A: Here, we've outlined a few ways that regions and availability zones might help applications achieve…
Q: Direction: Use predecessor instead of successor. - When applicable, choosing left sibling/parent…
A: A hierarchical data structure that is defined as a collection of nodes is called tree. The nodes are…
Q: What is the output of the followin
A: Answer: Option d C
Q: Please answer Values 6-10. Complete the following Incomplete LMC program by filling out the vacant…
A: An instruction model of the computer called Little Man Computer. It has simple von Neumann…
Q: It is difficult to construct a mobile network without the use of wireless technologies. Backhauling…
A: The question is to define the term Backhauling mobile signals.
Q: What are the distinctions between on-premises data centre and cloud security solutions in terms of…
A: On premises data centre is a group of servers which are privately own and control. It provides…
Q: Load the diamonds.csv file, and make 80% of the data in the order of the data as the training data.…
A: The code is given as follows:
Q: Write the quadruple for the expression, - (a*b)+(c + d) - (a+b+c+d).
A: The quadruple is nothing but the representation of the given expression . Hence we can do that…
Q: How do linear and quadratic probing differ?
A: Introduction: linear and quadratic probing is just techniques of collision resolution, A crash…
Q: Consider the greedy algorithm for the bin-packing problem, which is called the best-fit algorithm:…
A: An optimization problem where different size of items is packed into a number of bins or containers.…
Q: To add an item to the clipboard, you would .. A. Select the item, and click the copy button on the…
A: Select the text or graphics you want to copy, and then press Ctrl + C. Each selection comes in the…
Q: IX. Let L1/L2 = {xy | xy E L1 for some ye L2), find L1/L2 and describe the result in steps…
A:
Q: Convert below postfix expression to prefix expression using stack abcd+*/z-
A: Conversion of postfix expression to prefix expression. Algorithm: Scanned the postfix expression…
Q: What is the output of the following: int x=7; printf(x+1>8?"True":"False");
A: Given code: int x=7; printf(x+1>8?"True":"False"); Given options: False None True 8
Q: Code: 1 #include 2 3 float computeBusCost (float Distance) { float Cost; 11 12 13 14 15 16 17 18 19…
A: Functions in a programming language consists some set of instructions that target to perform a…
Step by step
Solved in 3 steps with 2 images
- Write the followingmethod that tests whether a two-dimensional array has four consecutive numbersof the same value, either horizontally, vertically, or diagonally:public static boolean isConsecutiveFour(int[ ][ ] values) Write a test program that prompts the user to enter the number of rows andcolumnsof a two-dimensional array then the values in the array, and displays trueif the array contains four consecutive numbers with the same value. Otherwise,the program displays false. Here are some examples of the true cases:A positive integer greater than 1 is said to be prime if it has no divisors other than 1 and itself. Write a program that asks the user to input an integer greater than 1, then display all of the prime numbers that less than or equal to the number entered. The program should work as follows: • Once the user has entered a number, the program should display an array with all of the integers from 2 up through the value entered. • The program should then use a loop to step through the array. The loop should pass each element to a method that displays the element whether it is prime number. Your result should look like, for example: Enter an integer greater than 1: 9 2, 3, 4, 5, 6, 7, 8, 9 2 is prime 3 is prime 4 is not prime 5 is prime 6 is not prime 7 is prime 8 is not prime 9 is not prime Using java programmingProblem2 Write a program that display the position of a given element in an array. You should print the index (i.e. the position) of the element. If the element appears more than one time than you should print all its positions. The size of the array should be entered by the user. If the element does not occur then you should display element not found. Sample1: Enter the size of the array: 5 Enter an array of size 5: 44 5 13 44 67 Enter the element to find: 44 44 is found at position 44 is found at position 44 occurs 2 time(s) Sample2: Enter the size of the array: 4 Enter an array of size 4: 12 150 17 20 Enter the element: 18 18 is not found
- Arrays Write three statements to print the first three elements of array runTimes. Follow each statement with a newline. Ex: If runTime = {800, 775, 790, 805, 808}, print:800 775 790Note: These activities will test the code with different test values. This activity will perform two tests, both with a 5-element array (int runTimes[5]). See "How to Use zyBooks".Also note: If the submitted code tries to access an invalid array element, such as runTime[9] for a 5-element array, the test may generate strange results. Or the test may crash and report "Program end never reached", in which case the system doesn't print the test case that caused the reported message. #include <iostream>using namespace std; int main() {const int NUM_ELEMENTS = 5;int runTimes[NUM_ELEMENTS];int i; for (i = 0; i < NUM_ELEMENTS; ++i) {cin >> runTimes[i];} /* Your solution goes here */ return 0;} Please help me with this problem using c++.Lab Activity for the students: Exercise 5: Write a program that asks the user to input 8 numbers and save them in a 2D array with 4 rows and 2 columns. The program finds the sum of all elements and prints the array in reverse order. (1 Mark ) Example : If the inputs are 12, 7, 23, 86, 40, 64, 97, 55. Then, the program will print: 55 97 64 40 86 23 7 12 Sum = 3841. Shift Left k Cells Use Python Consider an array named source. Write a method/function named shiftLeft( source, k) that shifts all the elements of the source array to the left by 'k' positions. You must execute the method by passing an array and number of cells to be shifted. After calling the method, print the array to show whether the elements have been shifted properly. Example: source=[10,20,30,40,50,60] shiftLeft(source,3) After calling shiftLeft(source,3), printing the array should give the output as: [ 40, 50, 60, 0, 0, 0 ]
- The array index can be any integer less than the array size… TRUE OR FALSESales.java contains a Java program that prompts for and reads in the sales for each of 5 salespeople in a company. Now modify the program as follows: Declare an array called sales to save the sales of 5 salespeople. Complete the header of the first for loop. This loop initializes the array. Complete the header of the second for loop. This loop computes the total of array elements. Add code to compute and print the average sale. Add another loop to print the id of each salesperson and the number of their sales. The salespeople are objecting to having an id of 0—no one wants that designation. Modify your program so that the IDs run from 1-5 instead of 0-4. // *************************************************************** // Sales.java // // Reads in and stores sales for each of 5 salespeople. Displays // sales entered by salesperson id and total sales for all salespeople. // // *************************************************************** import java.util.Scanner;…Write the following method that returns the locationof the smallest element in a two-dimensional array.public static int[] locateSmallest(double[][] a)The return value is a one-dimensional array that contains two elements. Thesetwo elements indicate the row and column indices of the smallest element in thetwo-dimensional array. Write a test program that prompts the user to enter a twodimensionalarray and displays the location of the smallest element in the array.Here is a sample run: Enter the number of rows and columns of the array: 3 4↵EnterEnter the array:23.5 35 2 10↵Enter4.5 3 45 3.5↵Enter35 44 5.5 9.6↵EnterThe location of the smallest element is at (0, 2)**
- For the array ADT, the operations associated with the type array are: insert a value in the array, delete a value from the array, and test whether a value is in the array or not. 1.true 2.falseEX15: write a program that return (1) when input number odd return (2) when input number is even 5/7 EX16: write a program that separate the content of a input array (a) into two arrays; (x) : contain the 6/7 numbers with odd index and other array (y) contain numbers with even index . EX17:let you have array A[20], write a program that read the array and swap the content of odd index with 7/7 the content of even index .For an array declartion of int number [25];, what will be the ending index? 0 1 24 25