In this program, we get the size of an array of integers from the user. Write a function which accepts only size of an array of integer numbers as its parameter. It dynamically allocates the array and populates the array with the cube of integer number from 1 to the size value and returns a pointer to the array. Print the result of the array contents in the main function.
Q: You are tasked with deploying websites on EC2 instances. The solution should be scalable and the…
A: I have provided the solution in step 2.
Q: Discuss CSMA/CA/CD. Describe each one's function and intended network. Describing the benefits and…
A: It manages communication when several users utilize a single shared channel or media. There are…
Q: As a security expert, you are asked to produce a corporate policy statement to protect the IT…
A: Security is the crucial part of the every organisation, because organization can hold the different…
Q: Which concerns were anticipated to be rectified as a result of the first Internet research? Finally,…
A: institution: With various resources, the Internet has developed in a number of ways. It has a…
Q: What is a link list?
A: Justification: An association list, often known as an a-list, is a common data structure in Lisp.…
Q: A "memory hole" is something that happens in your computer's memory. And how does the operating…
A: Computer memory is a collection of data stored in binary format. The phrase "main memory" refers to…
Q: Write M. file function to build MATLAB function (factorial four (4!) is equal to 24.) without using…
A: Please refer below for your reference: Language used is MATLAB: clc; disp(Factoria(5)) function f =…
Q: Suppose that Organization l's network has the IP address 111.0.0.0, Organization 2's network has the…
A: a) i) The IP address is 111.0.0.0 class : A Default subnet mask is : 255.0.0.0 Network IP address :…
Q: Distinguish between a worm and a Trojan horse. Explanation of THREE (3) malware infestation…
A: Distinguish between a worm and a Trojan horse. A Worm is a form of malware that replicates itself…
Q: CASE STUDY: A PAYROLL SYSTEM In this project, students are to use Java to develop a payroll software…
A: EmpPayroll.java import java.util.Scanner; // driver class public class EmpPayroll { // main…
Q: What are the advantages and disadvantages of various authentication procedures in terms of security?
A: Start: Users are commonly recognized by a user ID, and authentication occurs when the user offers a…
Q: The word "artificial intelligence" can refer to a number of different things. Describe the relevance…
A: Overview: Artificial intelligence (AI), in contrast to natural intelligence (NI), is the…
Q: 2.1 Differentiate between functional and non-functional requirements. 2.2 Give two examples of…
A: The Answer is in given below steps
Q: Assume you work on a network project for "x" company. Discuss the concept of non-repudiation as it…
A: Introduction: Non-repudiation is the assurance that you will not be able to question the legitimacy…
Q: A conditional test in a flow chart or pseudocode may cause results to differ. Why is this so?
A: Flowchart: A flowchart is essentially a visual depiction of a program's flow and states. Every stage…
Q: Explain the 3 types of control transfer structures in programming
A:
Q: What is the most important goal of normalization? What part do determinants play in the process of…
A: Normalization is a process of decomposition of large tables into a smaller tables.
Q: Trace the output the programming below. { int num[]; int size =5; num = new int [size]; num…
A: int size =5; Assign size with 5 num = new int [size]; Declare an array of size 5. The index of…
Q: Explain what green computing is and how it can help to enhance the environment's quality of life
A: Green computing : Computing has also resolved its offer to contribute to environmental preservation…
Q: This section is for students who have faced issues using AIT computer labs, covering the reasons and…
A: Introduction: A data center's topology in Tiered Cache indicates which data center should act as a…
Q: What are the specific goals of authentication? Compare and contrast the benefits and drawbacks of…
A: Authentication is the process of determining the identity of an individual process or entity seeking…
Q: Convert the Binary number 11100101 to: a. Hexa- Decimal b. Octal
A: Answer :
Q: After doing the following statement, the linked list becomes Head P Head 3000 4800 10 4900 15 5000…
A: Here in this question we have given a linked list with an operation to do on this.and We have asked…
Q: Find iL(t) and V1 (t) for t > 0 in following circuit. t = 0 12 Ω i ) 10 v (+ 4 A v;(t) 2H 5v,(t) ww
A:
Q: Define and explain the following words using the C++ programming language. 1. Binding late 2.…
A: Binding means converting identifiers i.e., names or variables into addresses. Binding is of two…
Q: I need a code to simply change the color of a square when ever a user clicks a button, in xcode
A: button1.layer.borderColor = [[UIColor purpleColor]CGColor]; button1.layer.cornerRadius = 8.0f;…
Q: What if VoIP suffers from the same challenges with the firewall that streaming audio does?
A: Introduction: Voice over Internet Protocol (VoIP) is frequently known as IP communication, is a…
Q: A conditional test in a flow chart or pseudocode may cause results to differ. Why is this so?
A: The Pseudocode: Pseudocode differs from flowchart in that pseudocode is an informal high-level…
Q: Why would a 1000Mb CAT6E cable be a terrible choice for a 328-foot length pull for high data…
A: The Answer is in step2
Q: 1. 2312.213210 to base-2 2. 1001110101.1012 to base-8
A: The start from step-2.
Q: Explain what causes a system to become stuck in a stalemate.
A: A database management system (DBMS), such as SQL Server, relies on the timeliness of file input and…
Q: Packet switching is more appropriate for mobile networks than circuit switching.
A: Inauguration: Appropriate for mobile networks rather than circuit switchingTraditional telephone…
Q: Companies regularly use cloud storage services to store client data. This data may contain contact…
A: Institution: Cloud storage a makes use of enormous computer servers a housed in data centres…
Q: Answer number 10,12
A: SQL stands for Structred Query Language.
Q: Find the maximum value in the bin
A: Write the code for the following methods using recursion: Find the maximum value in the binary…
Q: Explain why professional software designed for a customer isn't just a collection of programs…
A: Introduction: It isn't only the programmes generated for a client since professional software is…
Q: How should the relational database model be described?
A: Relational database : A relational database contains and allows access to data items linked to one…
Q: Write a program that declares an array of 10 numbers, and then read 10 single digit numbers nto the…
A: program that declares an array of 10 numbers, and then read 10 single digit numbers into the array…
Q: From the greatest to the tiniest component, describe the AWS Global Infrastructure.
A: Introduction: AWS Global Infrastructure is a service provided by Amazon Web Services.AWS is a cloud…
Q: Let B = {0,1}. Give a recurrence relation for the strings of length n in B * that do not contain 01.…
A: We are going to find out the recurrence relation for the strings of length n in B * that do not…
Q: The significance of storage and handling. Explain briefly.
A: In system point of view storage and handling is the bigger task, because these storage is mainly…
Q: Compare between a 32 bit computer system, with a 64 bit computer system, in terms of capabilities…
A: Answer: A 64-bit processor is more powerful than a 32-bit processor because it can handle a lot of…
Q: Explain the usefulness of employing the notion of Work Breakdown Structure (WBS) in managing a…
A: Introduction: A work breakdown structure (WBS) is a visual representation of the deliverables that…
Q: Follow the indicated operation in order to know the number system used for the answer. NO need to…
A: EXPLANATION: Given the decimal number is 2896. Following the conversion of a given decimal number…
Q: Discuss CSMA/CA/CD. Describe each one's function and intende Describing the benefits and drawback
A: Below the CSMA/CA/C and their benefits and drawback
Q: Explain why creating functions is important in programming.
A: Computing is referred to as programming when a set of instructions is created that instructs a…
Q: Comment on how pipelining can make computers faster, how pipeline dangers can be mitigated, and how…
A: Computer Architecture Using Pipelining It is a technique for collecting instructions from the…
Q: b) Find a root of the equation xe* – 1 = 0 by bisection method upto 4 decimal point using C…
A: Code: #include<stdio.h>#include<math.h> //Defining equation to be solved#define f(x)…
Q: 1. Create flowchart and algorithm to find the total salary of 50 employees in a company. Accept Name…
A: - We need to work on the Pseudocode , Algorithm, Flowchart.
Q: Write a program which reads the information from the file and outputs the same information to…
A: C++: C++ is a general purpose high level programming language. It was developed by Bjarne Stroustrup…
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
- (Numerical) a. Define an array with a maximum of 20 integer values, and fill the array with numbers input from the keyboard or assigned by the program. Then write a function named split() that reads the array and places all zeros or positive numbers in an array named positive and all negative numbers in an array named negative. Finally, have your program call a function that displays the values in both the positive and negative arrays. b. Extend the program written for Exercise 6a to sort the positive and negative arrays into ascending order before they’re displayed.1. Write a function named “getSumBeforeNegative” that takes in a pointer to the array of integers and its size. It will return the sum of all values before it sees a negative number. If there is no negative number in the list, it returns the sum of all numbers in the array.For example,int numList[] = {10,20,-1, 30);// will return 30int priceList[] = {10, 20, 30);// will return 60It must use pointers to integer instead of array index.Write a main program and show how this function is called and used.1. Write a function called void swap with two parameters, which will receive the addressof x and y as pointer. The function should swap the value of x and y only if x is larger thany. Print the value of x and y after the function call. 2. Write a function called double getAverage(int *array, int SIZE), whereit accept the array as pointer, and return the average of the array. Print the returnedvalue from this function. Always use *array rather than subscript to access the arrayvalue.
- Q1. Assume X is an array of char such that cahr X[] = “welcome C++II students to pointer camp, come and see the power and comfortable of pointers when it is combined with array. Enjoy camping and find common things between arrays and pointer commands”; Write a function that receives the array X and returns array of pointers to char. Each pointer in this array points to array of char (one word) that contains the phrase “com”. For example the array X has 6 words that each one contains the phrase “com”, they are [welcome, come, comfortable, combined, common and commands], so array of 6 pointers are returned each pointer in the returned array points to a word. Hint: if no words has the phrase “com” a NULL pointer should be returned don't use strstr()... you must write code for this function #in c++6. Write a swap function, that swaps the values of two variables in main, but usepointers instead of reference parameters.7. Write a function that takes an array of ints and its size as arguments. It shouldcreate a new array that is the same size as the argument. It should set the values inthe new array by adding 10 to each element in the original array. The functionshould return a pointer to the new array. (Make sure you use dynamic memoryallocation) can i get answers for this two sub parts. thanks10.1 Write a template function that returns the average of all the elements of an array. Thearguments to the function should be the array name and the size of the array (type int). In main (),exercise the function with arrays of type int, long, and double. 10.2 Create a function called amax() that returns the value of the largest element in an array. Thearguments to the function should be the address of the array and its size. Make this function into atemplate so it will work with an array of any numerical type. Write a main () program that appliesthis function to arrays of various types.
- 3. Write a function named “getCombinedPurchaseOrder” that accepts an array of PurchaseOrder object pointers, its size, description, and cost per item. It will go through the list in the array and return a pointer of a new PurchaseOrderobject that contains the total quantity of all the matched PurchaseOrderobjects(with the same description symbol and cost per item). It will return NULL if there is no match. For example, these 2 PurchaseOrderobjects with (100, 1.25, "A box of candy") and (200, 1.25, "A box of candy")will be combined into one new PurchaseOrderobjecthaving the quantity of 300. Please note that this function returns 2 separate values: the pointer to the newly created object and the number of matched PurchaseOrderobjects found in the list. 4. Write a function named “removeNegativePrice” that accepts the vector of pointers to PurchaseOrderobjects. It will go through that list and remove all PurchaseOrderobjectswiththenegativecost per item. It will also return how many…1. Write a function named "isBoundedArray" that accepts an array of integersand its size. The function will check the array to see whether the first and the last elementsin the given array are the smallest and largest in the list,or the largest and smallest in the list.If they are, it will return true. Otherwise, it will return false. Requirement: please use only pointer notation in the function. No array notation. For example, the following arrays will return true int numList0[] = {10} ; int numList1[] = {10, 20, 30, 40} ; int numList2[] = {40, 30, 20, 10} ; int numList3[] = {10, 30, 20, 40} ; int numList4[] = {40, 20, 30, 10} ;And these arrays will return false int numList5[] = {10, 40, 20, 30} ; int numList6[] = {40, 20, 30, 50} ; 2. Write a function named “isBinaryString” that accepts a C-string (an array of characterswith a NULL terminating character)and returns trueif that C-string contains a valid binary number and false otherwise. A valid binary string is defined…Part 1 Write a function that takes an integer array and the size of the array The array is supposed to have 'N' integers in it, where N-1 integers are repeated even number of times and one integer is repeated odd number of times For example array = {1,5,5, 1,2,5,2,2,5}. 1 and 5 are repeated even number of times whereas 2 is odd number times. The function should find the element which is repeated odd number of times and return it. In the case of the example shown above, the function should return 2. int FindSingleElement(int arr[], int size) { } int main(int argc, char *argv[]) { return 0; } THIS IN C++.
- C++ Write a function named “getTotalHourAndPayout” that accepts an array ofPayStub object pointers and its size. It will return the total number of hours andpayout amount for all of the PayStub in the given array. For example, if we have two paystubs of 40 hours and $10 pay rate with 50 hoursand $10 pay rate, it will return 90 hours and $950.Please show you would call and test this function.Write a function that accepts an int array and the array’s size as arguments. The function should create a new array that is twice the size of the argument array. The function should copy the contents of the argument array to the new array, and initialize the unused elements of the second array with 0. The function should return a pointer to the new array. Demonstrate the function by using it in a main program that reads an integer N (that is not more than 50) from standard input and then reads N integers from a file named data into an array. The program then passes the array to your array expander function, and displays the values of the new expanded array, one value per line. You may assume that the file data has at least N values. There are no prompts for the integer and no labels for the expanded reversed array that is printed out. If the integer read in from standard input exceeds 50 or is less than 0 the program terminates silently.Driver License Exam C++ 1Functions with array pointers as input parameters. 2. Functions that return an array of type pointer. 3. Program output with the original data of the problem. Driver’s License ExamThe local Driver’s License Office has asked you to write a program that grades the written portion of the driver’s license exam. The exam has 20 multiple choice questions. Here are the correct answers: 1. A 2. D 3. B 4. B 5. C 6. B 7. A 8. B 9. C 10. D 11. A 12. C 13. D 14. B 15. D 16. C 17. C 18. A 19. D 20. B Your program should store the correct answers shown above in an array. It should ask the user to enter the student’s answers for each of the 20 questions, and the answers should be stored in another array. After the student’s answers have been entered, the program should display a message indicating whether the student passed or failed the exam. (A student must correctly answer 15 of the 20 questions to pass the exam.) It should then display the total number of…