2. Given the array A = [3, 4, 0, 7, 8, 2] and B = [2, 9, 1, 7, 4, 11]. Write a program to find the %3D elements both in A and B (intersection). For example, in the previous arrays the output will be Output = [ 4, 7, 2] %3D
Q: 13. Write down the data structures that are most appropriate for the following tasks: C. I need…
A: As the prime numbers are fixed and we don't have any further additions or deletions, we can make use…
Q: Perform encryption and decryption using the RSA algorithm, for the following: 1. p = 5; q = 11, e =…
A:
Q: When we have volatile memory in the form of RAM (Random Access Memory), why do we need cache memory?…
A: Given: When we have volatile memory in the form of RAM (Random Access Memory), why do we need…
Q: What is the purpose of the Properties window? How does it work?
A: Answer :
Q: Modify the Item class to maintain a priority value. This value must also be set in the constructor.…
A: The given class has been modified as per the requirement.
Q: Describe the operation of a dual alternative decision structure in detail.
A: Decision structure As the name implies, a decision structure is an architectural feature in a…
Q: What are the information security and risk management distinctions between the perimeter network and…
A: A network perimeter denotes the secure boundary between a network's private and locally controlled…
Q: What is the purpose of dividing main and cache memory into sections?
A: According to the question the cache memory is the used to reduce average of the time to access the…
Q: When working with Linux, it comes with a set of processes for ensuring atomic operations on a…
A: Introduction: This kind of race scenario arises when two processes get the same value from a…
Q: You'll have to advise your customer on the best method for gathering requirements as a software…
A: As a Software Engineer, you'll be in charge of recommending the best strategy for gathering our…
Q: When utilising recursion to solve a problem, why does the recursive function have to call itself to…
A: --->Any recursive function is basically a function which calls itself to perform a…
Q: Why is multithreading more prevalent than having a flock of background processes? Explain
A: INTRODUCTION: Here we need to tell why multithreading more prevalent than having a flock of…
Q: Is it possible to write a scenario that may be used to assist in developing testing for the…
A: weather station system: The weather station is constructed using an accessible subsystem that…
Q: What what is an unnormalized design, and how do you convert one to 1NF?
A: Unnormalized database: An unnormalized database design is made up of a table or a series of tables…
Q: Is il parsible to avnid dala hazais vio thr use of for waning ?
A: In this we have to discuss can a data hazard be avoided using the concept called Forwarding. Let's…
Q: Write a string class. To avoid conflicts with other similarly named classes, we will call our…
A: The Answer start from step-2.
Q: 3) If a binary digit 1101 is applied as an input to 7442, what would the output be ?
A: 7442 is a BCD to Decimal Converter
Q: Why is it so important that a backup of drive C isn't kept on a different partition on the same hard…
A: Introduction: Various filesystems may be installed for different types of files thanks to…
Q: why tuple in python can have different data types? what is the advantage?
A: Ans: As the tuple is used to store the different types of elements that is string integer ,flot…
Q: Question 10 Use K-map to obtain the minimized sum of products form of the function f (x,y,z,w) =…
A: Explanation:
Q: Suppose we have 100 pages of data, and 10 pages of memory, what is the minimum number of passes…
A: Answer : we have 100 pages of data and 10 pages of memory
Q: Write a well-documented C++ program that: 1) Prompts the user to enter from the keyboard a…
A: Logic explanation: Divide the each number by 10 to get the remainder and then check each digit…
Q: A photographer is organizing a photo collection about the national parks in the US and would like to…
A: The Answer start from step-2.
Q: What distinguishes embedded systems programming from application development in general?
A: Answer : Difference between general application development and embedded system programming
Q: Define the term "process" at a high level. Is there any distinction between a procedure and a…
A: Answer the above questions are as follows:
Q: What role does a computer's organisation and architecture have in determining its applicability and…
A: Computer organization:- It's the configuration of a computer system's many hardware components to…
Q: Make a list of the most important steps in the installation and evaluation of a system.
A: Installing and evaluating a system involves the following steps:
Q: • Perform encryption and decryption using the RSA algorithm, for the following: 1. p = 5; q = 11, e…
A: The RSA algorithm is an asymmetric cryptography algorithm. It uses a public key and a private key…
Q: Question 5 Consider the following recognising Finite State Machine (FSM) S3 1,0 1.0 S1 S2 S4 So…
A: Find the answer with explanation given as below :
Q: HW10_3 A Using Newton's second law, it can be shown that the period T of a pendulum with length Land…
A: The MATLAB code is as follows
Q: What can we learn about performance optimization from Amdahl's Law?
A: The answer is given in the below step
Q: C program for array Get 10 elements from user and print it on screen
A: logic:- declare an array of size 10. iterate from i=0 to i<10 read arr[i] end loop iterate…
Q: 50 40 30 20 10 2 4 6 8 Time (s) 10 12 14 The diagram above shows the journey of a train plotted as a…
A: Find the answer with calculation given as below :
Q: phat are Ahe limi dations ofa Chmpukr with out an eferaling y tlem, in your opiniont ikad wuld . USv…
A: there is no application on the computer, so if we run a program, the system will control all…
Q: Create a flow chart on how to solve the average of three grades.
A: Here in the flowchart, I have declared variables to store the grades and their average. Next, I have…
Q: Why do we need modularization and what are the advantages of it? Give an example from your own life…
A: Given: We have to discuss why do we need Modularization and what are the advantages of it.
Q: Reduce the following lambda-calculus terms to the normal form. Show all intermediate steps, with one…
A: Cryptography in the Liturgy: Bishop encoded is a means of describing material and functions in the…
Q: Why should assembly language be avoided in the development of general-purpose applications? In what…
A: Assembly is a type of low-level programming language designed to communicate directly with the…
Q: Hi bartleby.com Please answer below question Write C code to print name entered by user Thank…
A: steps for writing C program code 1) first declare the header file. 2) second declare the main…
Q: Isn't it possible to use a Parent Class object in a Child Class and take use of all of its features?
A: As a result: Can't we use a Parent Class object in a Child Class and take use of all of its…
Q: Find a "one-of-a-kind" article on how Big Data allows businesses to track vast volumes of personal…
A: Customer data can be collected in three ways: by directly asking customers, by indirectly tracking…
Q: In 5 or more sentences, what is the difference between a single If statement and an If-Else…
A: Your answer is given below. Introduction :- It is required to execute statements in programming…
Q: What should businesses do if a security breach occurs?
A: What the Company Should Do After Data Violations:1. Notify Your Company Employees And Customers Of…
Q: 2. Find the regular expression for the following Finite Automaton. For this you are requested to…
A: Given finite automata contains, Set of input alphabets= {a, b} Set of states= {q0, q1, q2, q3, q4,…
Q: he CODE Must be in JAVA. Please show in simplest form and with comments. Please show the outputs as…
A: According to the Question below the solution: Output:
Q: Identify, assess, and control risk as part of risk management.
A: Management of Risk: Risk management identifies, evaluates, and minimizes risks that a corporation…
Q: What are the drawbacks of using MPS or FLOPS as a system throughput metric?
A: The complete form of FLOPS Floating Point Operations Per Second. The complete form of MIPS is a…
Q: The purpose of database logs is dual. What exactly are they
A: Log files for databases A database log is a collection of operations that a database management…
Q: What makes magnetic tape such a popular storage option?
A: Magnetic tape: Magnetic tape is a magnetic storage medium comprised of a thin, magnetizable layer…
Q: 2 3 5 6 1 00 72 50 90 35 2 00 0 71 70 73 75 71 0 3 72 77 | 90 4 00 50 70 60 40 5 90 73 77 60 80 35…
A: We are given an adjacency matrix and we are going to find out cost of minimum spanning tree. First…
Need a full answer of this question with the code in MIPS - Mars.
Step by step
Solved in 2 steps
- 1. Write a program that fills an array with 10 random integer values between O and 100, your program should then calculate and print the alternating sum of all elements in the array. for example, if the array values are (89, 35, 44, 61, 66, 52, 45, 16, 48, 73) then the sum will = 89- 35 + 44 - 61 + 66- 52 + 45 - 16 + 48 - 73 = 55. Sample Run: The generated numbers are: 2 11 44 38 66 72 38 67 43 13 The alternating sum is -8 2. Write a program that reads 10 characters from user and store them in an array. Then display one or more of the following messages: 1. All characters are letters 2. All letters in the list are upper 3. There is no vowel letter in the list 4. There is at least 2 digits in the list 5. There is at least 3 symbols in the list Sample run 1: Enter 10 characters: AB1OK8 M& ? All letters in the list are upper There is at least 2 digits in the list There is at least 3 symbols in the listWrite a program that takes 20 elements of array from user at run time. And also Find maximum element of array and swap it with last element of array. Display before and after swapping array.Modify your program in part (a) such that the user enters the numbers that will be populated to the array. A sample run would be as follows:Enter number 1 to populate: 2Enter number 2 to populate: 65Enter number 3 to populate: 9Enter number 4 to populate: 78Enter number 5 to populate: 27Enter number 6 to populate: 36Enter number 7 to populate: 25Enter number 8 to populate: 4Enter number 9 to populate: 61Enter number 10 to populate: -98Enter a number to search: 27Number 27 is in the array! A sample run would be as follows:Enter number 1 to populate: 2Enter number 2 to populate: 85Enter number 3 to populate: 9Enter number 4 to populate: 15Enter number 5 to populate: 22Enter number 6 to populate: 36Enter number 7 to populate: -87Enter number 8 to populate: 4Enter number 9 to populate: 1Enter number 10 to populate: 0Enter a number to search: 48Number 48 is not in the array!
- 3. Write a program to find intersection of two sorted array.For example, if the two sorted arrays as input are {21, 34, 41, 22, 35} and {61, 34, 45, 21, 11}, it should returnan intersection array with numbers {34, 21}. For the sake of this Problem, you can assume that numbers ineach integer array are unique.A run is a sequence of adjacent repeated values. Write a program that generates a sequence of 20 random die tosses in an array and that prints the die values, marking the runs by including them in parentheses, like this: 12 (5 5) 3 124 3 (2 22 2) 3 6 (5 5) 6 3 1 Use the following pseudocode: 1. Set a boolean variable inRun to false 2. For each valid index i in the array A. If inRun If values[i] is different from the preceding value Print ) o inRun = false · If not inRun o If values[i] is the same as the following value Print ( inRun = true. Print values[i] 3. If inRun, print )EX15: 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 .
- Write a program that prompts the user to enter 50 integers and stores them in an array. The program then determines and outputs which numbers in the array are sum of two other array elements. If an array element is the sum of two other array elements, then for this array element, the program should output all such pairs separated by a ';'. An example of the program is shown below: list[0] = 15 is the sum of: ---------------------- list[1] = 25 is the sum of: list[5], list[14]; list[13], list[47]; list[46], list[47]; ---------------------- list[2] = 23 is the sum of: list[0], list[33]; ---------------------- list[3] = 65 is the sum of: list[4], list[32]; list[13], list[20]; list[20], list[46]; list[21], list[34]; list[32], list[38]; ---------------------- list[4] = 34 is the sum of: list[0], list[14]; list[6], list[48]; ---------------------- list[5] = 6 is the sum of: ... If no two elements can equal the value of an element, the line can remain empty, as shown above for list[0] and…Create a array of size n and poulate it with random numbers in range @ to 150. Print the maximum number in the array. Take n as input by user. Write whole code in main function only.Given n>=1 and nWrite a program that does the following:- Prompts the user to enter 5 double floating point numbers and stores them in array A.- Creates another array B, and fills it by summing up the values of each two consecutivearray elements from array A.- Prints array B.For example, for array A = [2.2, 3.5, 6.7, 4.3, 1.5], array B will be = [5.7, 10.2, 11, 5.8]
- Programming in C language. RandomNumbers Declare an integer array locally with the size of 200. Create a program that asks the user how many numbers the have. Use your getChoicel) function from before. Make sure it does not exceed 200 as the locally declared array has the size of 200. Use a loop to assign random numbers from 1 to 10000 to the array elements. (Remember to use srand() to seed the random number generator). Use a second loop to display each number, and also determine the average of all values in the array. You must also find the largest and the smallest numbers. After the for loop, display the average of all numbers. This program will let you enter a list of numbers into an array. It will then display all of the numbers, and finally display the average of all numbers. How many numbers would you like to enter?10 Number 1 is 42 Number 2 is 8468 Number 3 is 6335 Number 4 is 6501 umber 5 is 9170 Number 6 is 5725 Number 7 is 1479 Number 8 is 9359 Number 9 is 6963 Number 10 is…Write a program that prompts the user to enter 50 integers and stores them in an array. The program then determines and outputs which numbers in the array are sum of two other array elements. If an array element is the sum of two other array elements, then for this array element, the program should output all such pairs.Create a program that reads in an array of strings (AKA a 2D array of char ). The strings should be read through a function that reads a single string at a time, assuming the original array still has space. For example, given a 20 amay of char with size 4x 32 it can store up to 4 strings of length 31. When you first create the array, there are no strings Reading a string using the function should increase the number of strings by 1. If 4 strings have already been read the function should not try and read a new string Define the following function in a file named string_utils.c with its declaration in string_utils.h . In string_utils.h, define MAXSTRINGS = 4 and STASIZE = 32.