1answer.
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
Elis [28]
3 years ago
10

What are the values of A[K] and A[K+1] after code correspopnding to the following pseudocode is run?

Computers and Technology
2 answers:
Black_prince [1.1K]3 years ago
5 0

Answer:

After running the given pseudocode the values will be:

A. A[K] = 20, A[K + 1] = 20

Explanation:

The given pseudocode appears to be applied on an array.

Let us look at the given pseudocode one by one

A[K] = 10;

This line of code assigns value 10 to the position A[K] in array

A[K+1] = 20;

This line of code assigns value 20 to the position A[K+1]

A[K] = A[K+1];

This line will assign the value at A[K+1] to A[K] which means value 20 will be assigned to A[K]

so after this line A[K] = 20

A[K+1 ] = A[K];

This line will assign the value in A[K] to A[K+1] as A[K+1] has the value 20 currently so

A[K+1] = 20

Hence,

After running the given pseudocode the values will be:

A. A[K] = 20, A[K + 1] = 20

NikAS [45]3 years ago
5 0

Answer:

After running the given pseudocode the values will be:

A. A[K] = 20, A[K + 1] = 20

Explanation:

The given pseudocode appears to be applied on an array.

Let us look at the given pseudocode one by one

A[K] = 10;

This line of code assigns value 10 to the position A[K] in array

A[K+1] = 20;

This line of code assigns value 20 to the position A[K+1]

A[K] = A[K+1];

This line will assign the value at A[K+1] to A[K] which means value 20 will be assigned to A[K]

so after this line A[K] = 20

A[K+1 ] = A[K];

This line will assign the value in A[K] to A[K+1] as A[K+1] has the value 20 currently so

A[K+1] = 20

Hence,

After running the given pseudocode the values will be:

A. A[K] = 20, A[K + 1] = 20

You might be interested in
This is a tableware use to serve the main dish
GuDViN [60]

Answer:

<em>Dinner plate is a type of plate used for main courses. The average dinner plate measures 11 or 12 inches across. This plate is the most used plate during the entire meal and it usually comes out after the salad, it is the plate resting just above the charger.</em>

6 0
2 years ago
A DBMS commonly receives data update requests from application programs.A. TrueB. False
Contact [7]

Answer:

A. True

Explanation:

DBMS is an acronym for database management system and it can be defined as a collection of software applications that typically enables computer users to create, store, modify, retrieve and manage data or informations in a database. Generally, it allows computer users to efficiently retrieve and manage their data with an appropriate level of security.

Some examples of a database management system (DBMS) are RDBMS, Oracle, SQL server, PostgreSQL, dBASE, Clipper, MySQL, Microsoft Access, etc.

A DBMS commonly receives data update requests from application programs through the Open Database Connectivity ( ODBC ) driver in case of communication with other database management softwares.

Basically, when a database management system (DBMS) receives data update requests from application programs, it simply instructs the operating system installed on a server to provide the requested data or informations.

4 0
3 years ago
Write a test program that creates two Rectangle objects—one with width 4 and height 40 and the other with width 3.5 and height 3
BARSIC [14]

Answer:

public class Rectangle {

   private double width;

   private double heigth;

   public Rectangle(double width, double heigth) {

       this.width = width;

       this.heigth = heigth;

   }

   public double getWidth() {

       return width;

   }

   public void setWidth(double width) {

       this.width = width;

   }

   public double getHeigth() {

       return heigth;

   }

   public void setHeigth(double heigth) {

       this.heigth = heigth;

   }

   public double perimeter(double width, double heigth){

       double peri = 2*(width+heigth);

       return peri;

   }

   public double area(double width, double heigth){

       double area = width*heigth;

       return  area;

   }

}

class RectangleTest{

   public static void main(String[] args) {

       //Creating two Rectangle objects

       Rectangle rectangle1 = new Rectangle(4,40);

       Rectangle rectangle2 = new Rectangle(3.5, 35.7);

       //Calling methods on the first Rectangel objects

       System.out.println("The Height of Rectangle 1 is: "+rectangle1.getHeigth());

       System.out.println("The Width of Rectangle 1 is: "+rectangle1.getWidth());

       System.out.println("The Perimeter of Rectangle 1 is: "+rectangle1.perimeter(4,40));

       System.out.println("The Area of Rectangle 1 is: "+rectangle1.area(4,40));

       // Second Rectangle object

       System.out.println("The Height of Rectangle 2 is: "+rectangle2.getHeigth());

       System.out.println("The Width of Rectangle 2 is: "+rectangle2.getWidth());

       System.out.println("The Perimeter of Rectangle 2 is: "+rectangle2.perimeter(4,40));

       System.out.println("The Area of Rectangle 2 is: "+rectangle2.area(4,40));

   }

}

Explanation:

  • Firstly A Rectangle class is created with two fields for width and heigth, a constructor and getters and setters the class also has methods for finding area and perimeters
  • Then a RectangleTest class containing a main method is created and two Rectangle objects are created (Follow teh comments in the code)
  • Methods to get height, width, area and perimeter are called on each rectangle object to print the appropriate value
5 0
2 years ago
What is a fax machine used for
pickupchik [31]

Answer:

A fax machine is used to send documents over a phone network.

Explanation:

The transmission that is sent is called "Faxes"

The easiest way to understand this is by having one person print a document at someone else's house. It is also a live time like a telephone, or like a text message.

4 0
3 years ago
Sub to the channel plz plz
Hunter-Best [27]

Answer:

um

Explanation:

6 0
2 years ago
Read 2 more answers
Other questions:
  • Question: A famous Disney Movie partially takes place in this city.
    15·2 answers
  • a reviewer is required to enter a reason in the comments field only when a candidate is recommended to be hired. which action ca
    8·1 answer
  • GUI allows users to communicate with a device and see what they are doing onscreen.
    9·1 answer
  • The _____ toolbar can be customized to the preferences of the user.
    7·1 answer
  • Define a class, addresstype, that can store a street address, city, state, and zip code. use the appropriate functions to print
    11·1 answer
  • E-mail messages, instant messages (IMs), or text messages sent and/or received within an organization a. are not included on a r
    9·1 answer
  • Choose the best type of loop for each situation.
    6·1 answer
  • What feature should be used before a document is printed
    8·1 answer
  • The Python language uses a compiler which is a program that both translates and executes the instructions in a high-level langua
    15·1 answer
  • Choose the answer that best completes the visual analogy.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!