AHPA #11: Changing Grades *use c programming language * Create a C function (switcher) that will receive a pointer to the finalExams array, using only pointers look for D scores and boost them to C scores. (ouput should be same as picture) #include void switcher() { } int main(void) { int finalExams[] = {90,82,65,79,67,82,94,64,88,78,92,61,96,83,74}; return 0; }
Q: The compilation command ("gcc -m64 -O0 -S -o main.s main.c") will generate a file named as "main.s",…
A: The objective of the question is to verify the output of a specific gcc compilation command and the…
Q: public double giveChange() ( } return change; return totalPrice; totalPrice= 0; itemCount 0; }…
A: The task involves rearranging and completing a Java code snippet to implement two additional methods…
Q: Fill in the bubbles for ALL correct choices: there may be more than one correct choice, but there is…
A: A foundational technique in machine learning for both classification and regression problems is the…
Q: What are the key components and functions of an ALU (Arithmetic Logical Unit) in a computing system?
A: An ALU (Arithmetic Logic Unit) which is a part of the CPU, is the principle element of a computer's…
Q: Keegan and Hossein founded Apadana Holdings, which operates under the name Mica Paint and Hardware.…
A: Digital technology encompasses a wide array of tools and systems that harness electronic or…
Q: If a pipeline has five (5) stages, then the pipeline speedup is approximately equal to: Group of…
A: The question is asking about the speedup that can be achieved by using a pipeline with five stages.…
Q: Task 4 In this task, we want you to arrange these items into rows as in the image below: Turnip…
A: 1<!DOCTYPE html> 2<html lang="en"> 3<head> 4 <meta charset="UTF-8"> 5…
Q: а b b 2 а b 3
A: Nondeterministic Finite Automata (NFAs) are computational models used in theoretical computer…
Q: Do you think 40 years in prison for an ex - CIA coder who leaked hacking tools to WikiLeaks was too…
A: Determining whether a 40-year prison sentence for an ex-CIA coder who leaked hacking tools to…
Q: A bash script contains the list bands = ["Green Day," "Pink," "ZZ Top," "Prince"]. What will be the…
A: In the given code snippet the list =>1bands = ["Green Day", "Pink", "ZZ Top", "Prince"]…
Q: lease Modify this code according to this instructions cmds.c – Need to modify the Cmd struct…
A: In the realm of C programming, managing command structures and functions efficiently is crucial for…
Q: What is the role of DNS (Domain Name System) in network infrastructure, and how does it facilitate…
A: 1) The Domain Name System (DNS) is a decentralized hierarchical system used to translate…
Q: Write a program that takes in three lowercase characters and outputs the characters in alphabetical…
A: The provided Java program takes three lowercase characters as input from the user,sorts them in…
Q: write how you got the answer on pencil and paper, also show your work and how you did it. 7.a.…
A: In this question we have to perform the arithmetic using binary notation.Let's calculate and hope…
Q: Compare the security differences between C++ and Java multi-threaded programs.
A: The objective of this question is to understand the security differences between multi-threaded…
Q: 1. Which of the following compound propositions is not logically equivalent to "p →q? a. qvp b. pv q…
A: ~p-> p The compound proposition ~p ->p is logically equivalent to the simple proposition ~p.…
Q: accessor
A: In a class definition, what type of method uses the values of the object's instance variables…
Q: Please help me with this. I want to make a tiled waves.png border in my code as shown in the image…
A: In this question we have been asked to develop a HTML Page for the given layout.Let's code and hope…
Q: How does Fault Management contribute to the reliability of network systems?
A: One essential element in guaranteeing the dependability of network systems is fault management.…
Q: What is the purpose of using interface in Java programming?
A: Java is an object-oriented language that is rather common and it makes it easy to create powerful,…
Q: 1.18 Give regular expressions generating the languages of Exercise 1.6. here is 1.6 Give state…
A: In the context of formal language theory, deterministic finite automata (DFA) and regular…
Q: Hello, I'm having difficulty with a particular problem and was wondering if you could provide…
A: We need to provide regular expressions generating the language DFA recognizing the language {w| w…
Q: Explain the significance of load events in the context of web technologies. how do they impact the…
A: Web technologies deal with the protocols, languages, and tools used in website and web application…
Q: Each question is a judgment question. Write down your answer with T for True, F for False, and give…
A: a. True. Packet switching is indeed better than circuit switching from a capacity perspective,…
Q: What are the key components and functions of a motherboard in a computer system how do they…
A: The motherboard (also called the backbone of a system), which is the main PCB in a computer, is the…
Q: Python problem Ask the user to enter their company name to validate it based on the database…
A: By using user inputs such firm name, rate, and hours worked, the Python code simplifies pay stub…
Q: The "objdump" tool can only decompile the "test" executable distributed with this assignment into…
A: The first part of the question is asking whether the 'objdump' tool can only decompile the 'test'…
Q: Describe the benefits of creating and using a class library. in regards to C#
A: The objective of the question is to understand the advantages of creating and using a class library…
Q: TAKE, the binary relation R: ”is of type” in the domain of types in the Java API. Prove that R is a…
A: Dear student, you have uploaded multiple questions in a single question. As per our guidelines,…
Q: Do you think one domain is more challenging than the others as far as applying security…
A: The objective of the question is to understand if there are any specific domains that pose more…
Q: Which of the following are true : a) The first element in a single dimensional array has subscript…
A: An array is a data structure that stores a collection of elements of the same data type under a…
Q: Write a program that can calculate the future and present value of an investment given various…
A: The objective of the question is to write a program in C that calculates the future and present…
Q: In MATLAB, how would you take an image of cells and remove the background noise so MATLAB can easily…
A: Analyzing cellular images often requires precise segmentation to isolate cells from background…
Q: Given this description for a switch structure, answer the question below. CA, FL, NV, TX and NY are…
A: Programming requires a great lot of specificity and customized answers to various inputs, especially…
Q: Suppose one packet is transmitted from a source to a destination via a path of N links each with a…
A: The objective of the question is to calculate the transmission delay time for P packets when the…
Q: Given an input of any amount of one currency, enter formulas that output the proportional amount of…
A: An expression that interacts with data in a worksheet to calculate or manipulate it is called a…
Q: Consider the following program: int x = 0, y = 10; co while(x!= y) x=x+1; || while ( x != y ) y = y…
A: We initialize two variables x and y with 0 and 10, respectively.Then, we have two concurrent…
Q: One use of the this pointer is to access a data member when there is a local variable with the same…
A: The this pointer in C++ is a reserved keyword that represents the memory address of the current…
Q: 1. Write a function maxCubeVolume in F# that takes a list of floating-point tuples that represent…
A: The function maxCubeVolume takes a list of floating-point tuples representing the dimensions of…
Q: The technologist's notion of Moore's Law is that the number of transistors per chip doubles…
A: Moore's Law, a foundational principle in technology, posits that the number of transistors on a chip…
Q: Discuss the role of annotations in Java, especially in frameworks like Spring.
A: Java annotations, similar to those in frameworks like Spring, are effective metadata markers that…
Q: Show all possible derivation of the given Sentence: id + id* id with the help of a parse tree using…
A: A parse tree, also known as a derivation tree or a concrete syntax tree, is an ordered, rooted tree…
Q: Write a program that reads integers userNum and divNum as input, and outputs userNum divided by…
A: The objective of the question is to write a program that takes two integers as input from the user,…
Q: jmp *(%eax) uses the value in register %eax as the jump target true or false?
A: Jump to an instruction in the current code segment (the segment pointed to by the CS register), also…
Q: What are the advantages of cloud systems
A: The objective of this question is to understand the benefits of using cloud systems in the field of…
Q: I have six ESP-WROOM-32D boards and six NRF24L01 modules. Each ESP-WROOM-32D board is connected to…
A: In the realm of Arduino-based wireless communication, orchestrating simultaneous interactions…
Q: What would pseudocode look like for the following Java application? Java source code: package…
A: The objective of the question is to convert the given Java code into pseudocode. The Java code is a…
Q: Write a program named CircleSphere that prompts the user for a double value representing a radius.…
A: The objective of the question is to write a Java program that prompts the user for a radius and…
Q: An ARP table does what? Links an IP address to a host name. Links an IP…
A: The objective of the question is to understand the function of an ARP (Address Resolution Protocol)…
Q: LAB 5.4 Nested Loops Bring in program nested.cpp from the Lab 5 folder (this is Sample Program 5.6…
A: Step-1: StartStep-2: Declare variable numStudents, numDays, numProgrammingHours, numBiologyHours,…
AHPA #11: Changing Grades
*use c
* Create a C function (switcher) that will receive a pointer to the finalExams array, using only pointers look for D scores and boost them to C scores.
(ouput should be same as picture)
#include <stdio.h>
void switcher() {
}
int main(void) {
int finalExams[] = {90,82,65,79,67,82,94,64,88,78,92,61,96,83,74};
return 0;
}
Step by step
Solved in 3 steps with 1 images
- Mark the following statements as true or false. A double type is an example of a simple data type. (1) A one-dimensional array is an example of a structured data type. (1) The size of an array is determined at compile time. (1,6) Given the declaration: int list[10]; the statement: list[5] - list[3] * list[2]; updates the content of the fifth component of the array list. (2) If an array index goes out of bounds, the program always terminates in an error. (3) The only aggregate operations allowable on int arrays are the increment and decrement operations. (5) Arrays can be passed as parameters to a function either by value or by reference. (6) A function can return a value of type array. (6) In C++, some aggregate operations are allowed for strings. (11,12,13) The declaration: char name [16] = "John K. Miller"; declares name to be an array of 15 characters because the string "John K. Miller" has only 14 characters. (11) The declaration: char str = "Sunny Day"; declares str to be a string of an unspecified length. (11) As parameters, two-dimensional arrays are passed either by value or by reference. (15,16)In C++ Create an array of head pointers, statically allocated of size 101 of that type: Now, create a pointer that can point to the first element: Show how to dynamically allocate an array of 101 elements of head pointers: Write the code to initialize each element to NULL: Rewrite the code to initialize each element to NULL using pointer arithmetic:5. Write a C++ function which accepts an int array and the array size as arguments. The function should dynamically create a new array which is the same size as the array passed in. Each element in the new array should be double the corresponding element in the array passed in. Return a pointer to the new array. E.g. if you pass in the array {2, -3, 5} of size 3, it should create a new array of size 3 with values {4, -6, 10} and return a pointer to it. int *doubler(int a[], int size) 6. Consider the following line of code: int temps[3] = {68, 72, 62}; - What does *temps contain? - What does *(temps+1) contain? - What does temps[1] contain? 7. The _____ function returns true if the character is an upper case letter of the alphabet: a) toupper() b) isupper() c) isalpha() d) isdigit() e) none of these 8. The _____ function converts a C-string to an int: a) strlen() b) length() c) len() d) atoi() e) none of these
- Creat a code in c++ using s class compute array By using pointer notation, write a program that have three local arrays of same size and float type in the main () function. And consider that the values of first two are already initialized. To takethe addresses of all the arrays as arguments, write the function named ComputeArrays () that adds the contents of the first two arrays and before returning that store the results in the third array. The fourth argument to this function can store the size of the arrays.Write a C/C++ function that receives, as arguments, a pointer to a double array, as well as the number of elements in the array (int). The function must use pointer operations (no block notation such as arr[i]) and must display each element in the array.(C Language) The Fibonacci sequence begins with 0 and then 1 follows. All subsequent values are the sum of the previous two, for example: 0, 1, 1, 2, 3, 5, 8, 13. Complete the Fibonacci() function, which takes in an index, n, and returns the nth value in the sequence. Any negative index values should return -1.
- C++ By defining a dynamic allocation for pointer array, ask the user to enter some numbers and then return a sorted list of those numbers.1. Write a C++ function named "extractDebugOption" that accepts arguments similar to argc (an integer for the array size) and argv (an array of pointers to C-string). It will determine whether it has the argument of "/debug yes" or "/debug no". It will return true if the debug option is yes. If "/debug no" or there is no debug option or "/debug" without "yes" or "no" followed, it will return false. Note: command line arguments are simply an array of pointers to C-string. Please test it with the following command line arguments These will return true"/debug yes""/compile /debug yes" These will return false"/debug no""/debug""debug""yes /debug""no /debug"1-Write a C++ program to input elements in array and sort array elements in descending order. How to sort array in descending order in using pointers.Use function to print out the original and sorted arrays, Example Input Input size of array: 10 Input array elements: 20, 2, 10, 6, 52, 31, 0, 45, 79, 40 Output Array sorted in descending order: 79 ,52,45,40,31,20,10,6,2,0
- Please Help me with This Problem Language = C++ Write a Menu Driven C++ program that creates one-dimensional array arr[] and initialize it with user. Theprogram should do following Tasks using Menu, the menu operations are implemented using functions:a) Write a function Count(), that counts the occurrences of x (a number) in arr[].b) Write a function Partition(), that take the first element of the array x and put x in a position suchthat all smaller elements (smaller than x) are before x, and put all greater elements (greaterthan x) after x.c) Write a function next_XOR(),the count of elements which are equal to the XOR of the next twoelements.d) Write a function Duplicates(),which calculated the frequencies of all the elements and displaythem.e) Write a function Circular(),which replace every element of the array by the sum of next twoconsecutive elements in a circular manner i.e. arr[0] = arr[1] + arr[2], arr[1] = arr[2] + arr[3],... arr[n – 1] = arr[0] + arr[1].f) Write a function…Solve the following C++ Program. you are supposed to DYNAMICALLY create 2 arrays of length 5 using pointer, Then take values from the user and put those values in ONE of the dynamic arrays and COPY those values from the first array to the second Array.C++ programming Assume an integer array of size 12 named arrSales stores the sales of a product for eachmonth. For example, sales for January should be stored in 1st position of the array, andFebruary is stored in 2nd position of the array and so on for the rest of the months.Write a segment of code in C++ that perform the following: 1. Define a string array of size 12 and initialise the values of the array with the values tothe calendar months from “January” to “December”.2.. Prompt user to enter a month in integer (e.g 1 for January). Then, display the salesfigure based on that month. Make sure month is display in letter format by using thearray defined in (i). Sample program runs as below:Enter a month:2The sales for February is RM60003.. Using loop structure, count the number of months where the sales is below RM2000.You should display the result, list the affected months (by using the array defined in(i)) and its actual sales figures respectively. For example if April, September…