Are there any errors in the following program

Assignment Help Computer Engineering
Reference no: EM13322504

Are there any errors in the following program? If so, please point them out and correct them. Explain why those errors are wrong.

#include <iostream>
using namespace std;
void display(int x[], int size);
void compute(const int x[], int size);
int main()
{
int y[5]={0};
compute(y,5);
}
void display(int x[], int size)
{
for (int i=0; i<size; i++)
cout << x[i];
}
void compute (const int x[], int size)
{
for )int i=0; i<size; i++)
x[i]=2*i+1;
size=size*2;
display (x, size);
}

 

Reference no: EM13322504

Questions Cloud

Calculate the difference in pressure at point a and point b : Some distance downstream, the velocity profile can be (very) roughly approximated by a region inside the wake with u = U/2 and an exterior region with u = 3U/2.
Find the maximum possible value of angular velocity of ball : A ball of mass (m) 0.5 kg is attached to the end of a string having length (L) 0.5 m. The maximum possible value of angular velocity of ball is
Explain what is the buffer strength : What is the buffer strength (ie the total of Ha and A). The concentration of weak base in the buffer on 0.126 M The concentration of weak acid in the buffer is 0.04906
Find the frequency of the siren heard by the car driver : A police car with a siren of frequency 8 kHz is moving with uniform velocity 36 km/hr towards a tall building which reflects the sound waves. The frequency of the siren heard by the car driver is
Are there any errors in the following program : Are there any errors in the following program? If so, please point them out and correct them. Explain why those errors are wrong.
Various roles and responsibilities within an organization : Managers have various roles and responsibilities within an organization. The key purpose of this project is to demonstrate your understanding of the managerial role within organizations.
Execute strategic global business plan : Why are operational processes so important when trying to execute your strategic global business plan?
Explain what is the pressure of dry h2 in mmhg : What is the pressure of dry H2 in mmHg. In atm. d. Assuiming ideal gas behavior, how many moles of H2 has were collected.
How does this force compare to the weight of an electron : The human eye can detect light intensities as small as about 8 10-23 W/m2. How does this force compare to the weight of an electron

Reviews

Write a Review

Computer Engineering Questions & Answers

  Find the object in the response was last modified

With nonpersistent connections between browser and origin server, it is possible for the single TCP segment to carry two distinct HTTP request messages.

  How we can implement a cardiac machine simulator in c++

Keep track of the bug location; which could be an index into the memory array. Watch out for cells 0 and 99; they are special. Read the input tape from a file that starts with a number telling you how various items are on the tape.

  Why didn''t the vendor just bid fewer disks

Why didn't the vendor just bid fewer disks

  What is the goal to exercises in the bluej textbook

What is the goal to exercises in the BlueJ textbook? For the remains of the course, you will answer the questions posed by BlueJ textbook-you will not require downloading an additional worksheet and filling it in as you did for first four units.

  Add items to the arraylist

Add items to the ArrayList, one at a time, based on user typed input. The user will be prompted for the String to be stored in the ArrayList and then hit enter. The user would be able to continue to add items to the ArrayList until they just hit e..

  Opening the "create and manage publications"

This project would challenge you to set up replication on your SQL Server installation. Every step to complete this process is not laid out for you here. Complete the steps and document your choices throughout the process with screen shots and exp..

  Create a good design of the functions to make the best use

Write down a Python program that will first ask the number of overs each team will bat. The program then will continue to ask the score board people to input the runs for every ball for Team A until the team gets all out or they run out of overs. ..

  Include the declaration in a program

Write down a declaration to store the string "This is a sample" in an array named samtest. Include the declaration in a program that displays the values in samtest in a for loop that uses a pointer to access each element in the array.

  Information security

What skills are required by personnel working in the information security? State some job titles in field and come up with some required qualifications and some desirable qualifications.

  Sha-256 and rc4

SHA-256 (with 256-bit output) is more resistant to the attacks based on birthday paradox than SHA-1. Key reuse is deadly for the stream ciphers such as RC4.

  Write program that librarian use to enter a book checkout

Write your class, using your class write a program that a librarian can use to enter a book checkout, remove a checkout when a book is returned, or prints out all the books on loan. check outs should be stored in a list.

  Questions on risc machine

Questions on RISC machine

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd