answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vladimir79 [104]
2 years ago
9

When ____ occur during preliminary debugging, dummy print statements—statements that are temporarily inserted into the code to d

isplay status information on the screen—can be used to help locate the error.
Computers and Technology
1 answer:
ANEK [815]2 years ago
4 0

Answer:

Logic error.

Explanation:

When a logic error occurs sometimes it becomes difficult to locate the error in the code.So to locate the error dummy print used to see which loop,if,else,switch case etc. is executing or not.

for example:-

for(int i=0;i<45;i++)

{

if(i!=1)

{

   continue;

}

cout<<i<<endl;

}

we wanted the loop to print all value of i except 1 but it is printing only 1.We can use dummy print statement for this code in if condition.for(int i=0;i<45;i++)

{cout<<"Loop"<<endl;

if(i!=1)

{

cout<<"Printing"<<endl;

   continue;

}

cout<<i<<endl;

}

We see that the loop is printed 45 times and printing 44 times.We found that the condition in if statement is wrong.It hould be '==' instead of '!='.

You might be interested in
Given a int variable named yesCount and another int variable named noCount and an int variable named response write the necessar
sergejj [24]

// This command takes input from the user.

Scanner input = new Scanner(System.in);

int response= input.nextInt();

// Making the variables required

int noCount =0 ;

int yesCount =0;

// Checking the response if it is 1 or 2 and reporting accordingly

if(response == 1 || response ==2){

 yesCount+=1;

 System.out.println("YES WAS RECORDED");

}

// Checking if the input is 3 or 4 then printing the required lines

else if (response == 3 || response ==4){

noCount+=1;

 System.out.println("NO WAS RECORDED");

}

// if the input is not valid than printing INVALID

else{

System.out.println("INVALID");

}

 

 

 

6 0
2 years ago
Choose all items that represent characteristics of a functional resume. based on data obtained from a career portfolio lists pri
insens350 [35]

The answers are;

highlights job roles and skills rather than positions

contains data relevant to the position for which you are applying

based on data obtained from a career portfolio

Skills and achievements in a functional resume are the focal points. This is the reason why a functional resume is also known as the skills-based resume. This resume is not commonly used. However, job seekers who are changing careers or have gaps in their employment history typically use a functional resume to emphasize their capabilities. On the contrast, a traditional chronological resume shows a timeline of reverse work experience with brief explanations of each job.

4 0
1 year ago
Read 2 more answers
Use the loop invariant (I) to show that the code below correctly computes the product of all elements in an array A of n integer
NeTakaya

Answer:

Given Loop Variant P = a[0], a[1] ... a[i]

It is product of n terms in array

Explanation:

The Basic Step: i = 0, loop invariant p=a[0], it is true because of 'p' initialized as a[0].

Induction Step: Assume that for i = n - 3, loop invariant p is product of a[0], a[1], a[2] .... a[n - 3].

So, after that multiply a[n - 2] with p, i.e P = a[0], a[1], a[2] .... a[n - 3].a[n - 2].

After execution of while loop, loop variant p becomes: P = a[0], a[1], a[2] .... a[n -3].a[n -2].

for the case i = n-2, invariant p is product of a[0], a[1], a[2] .... a[n-3].a[n-2]. It is the product of (n-1) terms. In while loop, incrementing the value of i, so i=n-1

And multiply a[n-1] with p, i.e P = a[0].a[1].a[2].... a[n-2].

a[n-1]. i.e. P=P.a[n-1]

By the assumption for i=n-3 loop invariant is true, therefore for i=n-2 also it is true.

By induction method proved that for all n > = 1 Code will return product of n array elements.

While loop check the condition i < n - 1. therefore the conditional statement is n - i > 1

If i = n , n - i = 0 , it will violate condition of while loop, so, the while loop will terminate at i = n at this time loop invariant P = a[0].a[1].a[2]....a[n-2].a[n-1]

6 0
2 years ago
Write a program whose input is two integers and whose output is the two integers swapped. Place the values in an array, where x
Aliun [14]

Answer:

import java.util.Arrays;

public class swap{

   public static void main(String []args){

       int [] arr = {2,4};

       swapValues(arr);

   }

   public static void swapValues(int[] values){

       int temp;

       System.out.println(Arrays.toString(values));

       temp=values[0];

       values[0]=values[1];

       values[1] =temp;

       System.out.println(Arrays.toString(values));

   }

}

Explanation:

In the program above, we created the method swapValues that receives an array of integers as parameters. in the method definition, we created a temp variable that is used to swapp the element at index 0 and index 1. Java's Arrays.to string method is used to print the array before and after the swap.

7 0
2 years ago
Lai worked on a global team for an American company, and all her work had to be completed in her second language, English. Somet
N76 [4]

Answer:

E) Encoding.

Explanation:

Communication is important aspect of life.Communication barriers occurs at all stages of communication from when the sender sends the message to the receiver receiving the message. Lack of communication skill in that particular comes in encoding barrier.So we conclude that the answer is Encoding.

4 0
2 years ago
Read 2 more answers
Other questions:
  • vertical exchanges are typically used only to buy and sell materials required for an organization's support activities ( True or
    14·2 answers
  • Mathematical computations by a computer are faster than your quickest mathematical computations because the top speed of a neura
    13·1 answer
  • Ciscon Telecom is a mobile operator in the European Union. The company provides personalized services to its customers, and its
    8·2 answers
  • A hotel salesperson enters sales in a text file. Each line contains the following, separated by semicolons: the name of the clie
    7·1 answer
  • [Assembly Language]Extended Subtraction Procedure.Create a procedure named Extended_Sub --(Receives: ESI and EDI point to the tw
    12·1 answer
  • 6.4 Predicting Prices of Used Cars. The file ToyotaCorolla.csv contains data on used cars (Toyota Corolla) on sale during late s
    5·1 answer
  • Jen is trying to discover if a motor has failed windings. What sort of test can she do.
    6·1 answer
  • 1. Assign to maxSum the max of (numA, numB) PLUS the max of (numY, numZ). Use just one statement. Hint: Call FindMax() twice in
    7·1 answer
  • Select the correct answer. Andy wants to become a multimedia producer. Which degree can help him achieve this goal? A. bachelor’
    5·1 answer
  • Two middle-order batsmen are compared based on their performance in their previous cricket match.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!