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
sleet_krkn [62]
4 years ago
6

8. What is output by the code segment below?

Computers and Technology
1 answer:
vova2212 [387]4 years ago
4 0

Answer:

b. 1 2 3 4 5

Explanation:

Let us analyze the given code one statement at a time.

int [] x = {1,2,3,4,5};  // Initializes an integer array x

int [] y = new int [5] ; // Allocates a new integer array y

for (int i : x)

y = x;

This assign the variable y with the array x

for (int i : y)

System.out.print (i + " ");

The content of the attay y is printed one element at a time.

The final output will be as follows:

1 2 3 4 5

You might be interested in
What is the correct term for a piece of malware that hides inside a legitimate software program or file from trusted sources
Phoenix [80]

Answer: Trojan horse

Explanation:

Based on the Greek legend of how Greek soldiers hid in a Trojan horse to infiltrate and destroy Troy from within, Trojan horse malware mirrors this attack when attacking software.

It hides inside and disguises itself as a legitimate software program or a file from a trusted source and then when clicked on, it works to infect the software.

8 0
3 years ago
C++
Nookie1986 [14]

Answer:

Following are the code to the given question:

#include <iostream>//header file

using namespace std;

class Window //defining a class Window

{

private:

int width, height;//defining integer variable

public:

friend ostream& operator << (ostream& stm, Window& width)//defining a friend function that takes two parameters

{

return stm<<"a ("<<width.width<<" x "<<width.height<<") window"; //use return keyword that return its values

}  

Window(int width, int height): width(width), height(height)//defining parameterized constructor that inherit width and height in its parameters  

{}

};

int main() //Main method

{

Window w(80,90);//calling class constructor

cout<<w;//print object value

return 0;

}

Output:

a (80 x 90) window

Explanation:

In the above code, a class "Window" is defined that uses a friend function "ostream& operator" is declared that uses the "ostrea&" as a data type to hold two-variable "stm and w" in its parameter, and declared the parameterized constructor to hold value by inheriting width and height in its parameters.

Inside the main method, a class object is created that calls the constructor and uses the print method to print object value.

7 0
4 years ago
PLEASE HELP WILLL GIVE BRAINLIESTTTTT!
maria [59]

so a description of a mask tool that is used like painters tape to section off a spot so you do not chage that area

hope this helps

-scav

8 0
3 years ago
Read 2 more answers
A ____ is several programs simultaneously processing the same I/O stream.
Sonja [21]
Concurrent multiple program execution, opposite to pipeline execution where it needs to in a sequential or in order of execution. You can also say parallel process programming.
6 0
3 years ago
Read 2 more answers
Every computer consists of physical components and nonphysical components. the nonphysical components of a computer that underst
IrinaVladis [17]
Physical component means Computer Hardware which you can touch and non Physical component means Software, which you can not touch. nonphysical component designed specially for physically component. like Microsoft company designed Software according the Hardware for example Microsoft windows 64 bit could not install on which 32 bit Architecture Hardware.
7 0
3 years ago
Other questions:
  • You tell pavel that he needs to set up a wi-fi network whose range will need to be about 350 feet. pavel tells you that you need
    14·1 answer
  • A friend of yours is having trouble getting good Internet service. He says his house is too remote for cable TV—he doesn’t even
    11·1 answer
  • What nuclear remediation site had their computers wiped clean by notpetya?
    15·1 answer
  • Which of the following statements is true?
    5·1 answer
  • Tips for Interactions with Personalized LinkedIn Outreach?
    5·1 answer
  • Exercise 3.7.1: Proving statements about odd and even integers with direct proofs. info About Each statement below involves odd
    6·1 answer
  • Which game would be classified as an advergame?
    6·2 answers
  • Write a program in Python to sum to numbers:<br><br> Urgently needed, please.
    14·1 answer
  • Why do we need to know the different Networking Devices?​
    10·1 answer
  • Write 10 sentences of your own and underline the verb.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!