Write a program that will take n floating point numbers as input and print the sum, average and maximum of the numbers. Use dynamic memory allocation and pointers to do the task. Sample input file: 5 12 24 34 45 56 Sample output file: Sum : 171.0 Average : 34.2 Maximum : 56
Q: Science
A: The code is given as,
Q: Homework 2 1. Write a piece of code to find the number of odd integers in an array of size 1024 byte…
A: MOV AX,21000H ;load segment address of the given address 2000(20000+1000) MOV DS,AX ;load into…
Q: Write C++ program to do the following : 1. Declare an array of size 7 integer numbers 2. Read 7…
A: Actually, array is a collection of elements.
Q: A common memory matching game played by young children is to start with a deck of cards that contain…
A: Program: //using header file #include <iostream> #include <time.h> #include…
Q: You are to write an Intel x86 assembly language program which makes use of a loop to access the…
A: .model small ;Using a simple model with 1 Data segment and 1 Code Segment of size 64KB eachprintmsg…
Q: solve it asap please
A: Since no programming language is mentioned, I am using python. Algorithm: Start Declare an empty…
Q: You are to write an Intel x86 assembly language program which makes use of a loop to access the…
A: .DATA message db 'juMping JAck flaSh #1',10, 0' .CODE MAIN PROC ;get data segement in AX MOV AX,…
Q: Próblém B. Comparator Input file: Output file: standard input standard output 2 seconds Time limit:…
A: Code: #include <iostream>using namespace std;int main(){ //declaring required variables…
Q: If you want to define integer far pointer *n to address (Ox2000;0x200) O int far *n=(int…
A: The far pointer can access all 16 segments of the RAM memory. The size of the far pointer is 4 bytes…
Q: Extend the below program such that when reading the 3 values per record from the file, the values…
A: Programing instructions: Declare the required variables. Open the file in the reading mode. Read…
Q: Write a C program that will ask the user to enter 50 positive integer. If the user enters an invalid…
A: #include <stdio.h> int main(){ int matrix[10][5]; long int sum=0; for(int…
Q: Given the declaration below, if array aData[] was associated to the starting address 1010 (in…
A: Find the answer with calculation given as below :
Q: Given the declaration below, if array aData[][] was associated to the memory location 1010 (in…
A: Please refer below for your reference: double aData[6][4]; it meansthere are 6 rows and 4 columns.…
Q: Write a program that asks the user to enter a positive integer (o or higher). For the positive…
A: Below is the code in C++ and sample output:
Q: Write a program that transfers 6 bytes of data from memory locations with offset of 0010H to memory…
A: Assembly language is a low-level programming language for a computer or other programmable device…
Q: write a program to check that array is empty or not and write its algorithm in c++?
A: Given To do a c++ program to check that array is empty or not.
Q: A) Write a short program to find the smallest number among 16 numbers array saved in sequence at…
A: The answer is given below:-
Q: Assuming the pointer is 4 bytes in length and the int is also 4 bytes in length, choose the most…
A: Assuming the pointer is 4 bytes in length and the int is also 4 bytes in length, choosing the most…
Q: Write a Java program called E2b that will read from Stdln an integer, n, and will set the size of a…
A: The code is written below- import java.util.Scanner; // importing the package public class Main //…
Q: Write a c++ program that reads at most 100 integers (max storage of the array, not necessary to…
A: I am going to try 6 numbers first. You can change the 6 number into 100. It will print the frequency…
Q: Write a java program that specifies three parallel one dimensional arrays name length, width, and…
A: create three array L, W, A of size n where n is taken by user. Iterate from i=0 to i<n…
Q: C) Write a program to count the even and odd numbers in array of 16 byte numbers. The starting…
A: Start. Check if the number is divisible by 2 or not. If not, then increment odd count. Else…
Q: Write a C program that creates an array of 10 floating values. After accepting the inputs, display…
A: #include<stdio.h>#include<limits.h> int main(){ float arr[10]; float min =…
Q: Write an Assembly Language program that allows the user to enter a 5 numbers and store them in an…
A: An 8086 assembly program is written. The program is compiled in emu8086 emulator The assembly code…
Q: Write a Java Program named EmployeeRecords that simulates a company's HR system. The program reads a…
A: #include<iostream> #include<fstream> #include<string> using namespace std; int…
Q: Write a c++program that: Define a class student with the following fields: a. string First name b.…
A: Write a c++program that: Define a class student with the following fields: a. string First name b.…
Q: ?What this program portion is performing MOV AX, 0300H MOV DS, AX MOV SI, 0010H MOV DI, 0010H MOV…
A: The answer is None of them. The program actually performs- takes contents of DS:SI that is 0300:0010…
Q: Write C++ program to do the following : 1. Declare an array of size 7 integer numbers 2. Read 7…
A: Use ofstream in fstream library for writing contents into file
Q: Write a C program like this read a number from user such as Key1=1556 find 1156=x(mod100) assign…
A: Solution: Given, read a number from user such as Key1=1556 find 1156=x(mod100) assign x to an…
Q: Write a C++ program in which, read integers from file "data.txt" into an integer array. First…
A: the c++ code is an given below :
Q: What is the complexity of the following code segment (assume all the libraries are included)? int x…
A: The correct option is
Q: Write a java program that will generate a permuterm index from the terms in the files in an input…
A: import java.io.*;import java.util.*; public class Permuterm { // defination for the…
Q: Write a C++ program to create a two-dimensional dynamic array of integers, which stores integer…
A: //code: #include <iostream>#include <iomanip>using namespace std; // typedef for an…
Q: Write a program loads the block of memory locations from OA1000H through OA10FFH with number DDH…
A: Given: write a program loads the blockof memory locations from OA100OH through OA1OFFH with number…
Q: What will be the output of the following code,
A: The array name acts as a constant pointer which points to the first element of the array. The…
Q: The output of the following code int a[3] = { 1, 2, 3 }; printf( "a[0] = [%d] = %d", a,*a); %3D %3D…
A: Given: #include<stdio.h>int main(){ int a[3]={1,2,3}; printf("a[0]=[%d]=%d",a,*a);} Find the…
Q: Write a program to counts the odd numbers in array saved in address 0200:2430H. Use DATA: 6FH, 3DH,…
A: The Answer is
Q: 三 Use Python only and take input from files called "input.txt", and output at "output.txt".…
A: the answer is given below:-
Q: You are to write an Intel x86 assembly language program which makes use of a loop to access the…
A: The code is below screenshot and output
Q: Given the following code, show step by step and explain how variables are created and eliminated in…
A: 1) Main is executed so, variable a and c with values 3 and 4 are created in RAM memory. 2) After…
Q: Implement a function ingredients in Python that takes a recipe and returns a dictionary of the…
A: Given: Implement a function ingredients in Python that takes a recipe and returns a dictionary of…
Q: Write a 8085 program to find the only number which appears only one time in an array and store it to…
A: Algorithm: Use XOR. XOR of all the elements will give the number that appears once. This is because…
Q: Write a C++ program that reads a maximum of 100 integers from the keyboard,stores them in a long…
A: program: #include <bits/stdc++.h> using namespace std; // Driver codeint main(){ int…
Q: Write a c language program to scan a character array n and an integer k from the user, then…
A: code: #include<stdio.h> int main() { char arr[] = {'a','b','c'}; //Initialize array int…
Q: Find the output of the given code if it is compiled on a 64-bit system. #include int…
A: To find the output of the given C program if it is compiled on a 64-bit system. Basic Information…
Q: Write a C program to accept the user input (a positive integer) n, which represents the size (or…
A: code: ============================================================================ #include…
Q: Write a Java program called E2b that will read from StdIn an integer, n, and will set the size of a…
A: import java.io.BufferedReader;import java.io.InputStreamReader; class E2b{ public static void…
Write a
Step by step
Solved in 4 steps with 2 images
- Using pointers create a c program with a function that asks for a maximum number of inputs and counts how many even numbers are there in the array. Example: Enter max inputs: 3 Enter input 1: 561 Enter input 2: 780 Enter input 3: 943 Even count: 1 Even numbers: 780 Address: xWrite a C++ program that requests the user to enter 10 floating-point values. The first 5values are stored in the array A, while the next 5 values are stored in array B. Then, calculate C = A + B, where C is an array. Write the result in a file in the following format:Ci = Ai + BiWrite a C++ program that accepts an array of numbers and determines and displays the smallest number. See sample output below. Use dynamic memory allocation. Enter array size: 5 Enter 5 numbers: 5.89 1.92 3.96 9.8 6.4 The smallest number is 1.92
- C++ Programming, Create a program that will accept two integer numbers. These integer numbers will be the limit of the multiplication table. Store the values in a two dimensional array. Sample output: Enter x: 2 Enter y: 3 1 2 3 2 4 6calculate number of memory bytes accessed by this program: void my_dgemv(int n, double* A, double* x, double* y) { for(int i = 0; i < n; i++) { for(int j = 0; j < n; j++) { y[i] += A[i * n + j] * x[j]; } } }Program in Java Modify the Ceiling Tile program: • Read from a file the input information (you can use the tile.txt file) • Store the tile size information in arrays • Display to the console the information you read from the file • Display your calculations.
- 1. Write a C++ program that accepts an array of numbers and determines and displays the largest number. See sample output below. Use dynamic memory allocation. Enter array size: 5 Enter 5 numbers: 5.92 1.92 3.96 9.8 6.4 The largest number is 9.8a C++ program that creates a two-dimensional integer array (4x3) initialized with user given data. The program should have the following functions: • Print the sum of all values in the array. • Print the average of all the values in the array. • Take row number from user and print the sum of the values in that specified row.(use loop and no if statement) • Take column number from user and print the sum of the values in that specified column.(use loop and no if statement)What is the correct way to assign the pointer p to the address of x?. Single choice. p = %x; p = &x; &p = *x; *p = &x;
- 2. you have data of size 499 byte stored in an array starting at 45000H, write a program to check the data if it is positive store it in memory location starting at 47000H, if it is negative change it into positive and store it in the same arrayThe program below uses pointer arithmetic to determine the size of a 'char' variable. By using pointer arithmetic we can find out the value of 'cp' and the value of 'cp+1'. Since cp is a pointer, this addition involves pointer arithmetic: adding one to a pointer makes the pointer point to the next element of the same type. For a pointer to a char, adding 1 really just means adding 1 to the address, but this is only because each char is 1 byte. Compile and run the program and see what it does. Write some code that does pointer arithmetic with a pointer to an int and determine how big an int is. Same idea – figure out how big a double is, by using pointer arithmetic and printing out the value of the pointer before and after adding 1. What should happen if you added 2 to the pointers from exercises 1 through 3, instead of 1? Use your program to verify your answer #include <stdio.h>int main( ) { char c = ‘Z’; char *cp = &c; printf("cp is 0x%08x\n", cp); printf("The character…Write a program using c++ Programing language to calculate students' average test scores and their grades. You may assume the following input data: Johnson 85 83 77 91 76 Aniston 80 90 95 93 48 Cooper 78 81 11 90 73 Gupta 92 83 96 38 59 Blair 23 45 96 38 59 Clark 60 85 45 39 67 Kennedy 77 31 52 74 83 Bronson 93 94 89 77 97 Sunny 79 85 28 93 82 Smith 85 72 49 75 63 Use four arrays: a one-dimensional array to store the students' names, a (parallel)…