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
aleksandr82 [10.1K]
3 years ago
11

Consider the following code segment.

Computers and Technology
1 answer:
Bingel [31]3 years ago
3 0

Answer:

A.)

arr[0] = 10;

arr[1] = 10;

Explanation:

Given the array:

arr = {1,2,3,4,5}

To set the first two elements of array arr to 10.

Kindly note that ; index numbering if array elements starts from 0

First element of the array has an index of 0

2nd element of the array has an index of 1 and so on.

Array elements can be called one at a time using the array name followed by the index number of the array enclosed in square brackets.

arr[0] = 10 (this assigns a value of 10 to the index value, which replace 1

arr[1] = 10 (assigns a value of 10 to the 2nd value in arr, which replaces 2

You might be interested in
Write an expression that evaluates to true if the value of the string variable s1 is greater than the value of string variable s
Oksanka [162]
It is not entirely clear what this question means. I am going to assume that 'value' of a string refers to a numerical value, i.e. the strings represent numbers. The question also does not mention the programming language to use. There is a function in Delphi:

function isGreater(number1, number2: string): boolean;
begin
     Return StrToFloat(number1)>StrToFloat(number2);
end;


6 0
3 years ago
What important technology has done the most to allow small businesses a change to compete with larger international companies.
Natalka [10]

Answer:

If this is actually college then thats weird cuz im in middle school and im doing this stuff. And the answer is wireless networks

Explanation:

3 0
3 years ago
Most students overestimate their skill level and abilities to take open book tests.
leonid [27]
True...the assumption being that the student believes he/she will be able to locate the answer within the text rapidly, but they underestimate the fact that "application" of the content/question is primarily what the instructor is looking for, and will require critical thinking skills to apply the book content to the the question; not just "find the answer". 
3 0
3 years ago
Read 2 more answers
What is the extension of a BASIC256 program file?​
algol13

Answer:

The extension of a BASIC-256 program file is kbs

4 0
3 years ago
How are static variables and methods created in Java? What happens if a non-static method of a class tries to access a static va
9966 [12]

Answer:

Static variables are the variables decaraed with keyword static, static variables must be deacraled inside the class body, means we can not declare a static variable inside a method or consttructor, static variable belongs to class, for a class only one copy is created for static variable and used by all the objects/instances.

Static variable can access with class name like

X.i

Static method are the methods defined with static keyword, static method are also part of a class, we can access static meethod using class name like

X.printI()  

Explanation:

class X

{

//to create a static variable we need use static keyword with variable name like

public static int i;

// to create a static method we need to use static keyword while defining a method like

public static void printHello() {

 System.out.println("Hello");

}

/*

 * A non static method can access static variable of a class there is no issue

 * with that we can use a static variable in a non static method like

 */

public void printI() {

 System.out.println(i);

}

/*

 * As long as the class exist in JVM static variables will be there, as static

 * variable belong to class not with the instance,

 * it does not matters if there are instance exist or not

 */

}

4 0
3 years ago
Other questions:
  • Why is it helpful hat the ribbon tabs can collapse
    10·1 answer
  • If you need to reprogramming your gps after you begin driving __.
    15·2 answers
  • If you have a rubric, “your teacher can prove you knew what you were supposed to do.” T/F
    10·2 answers
  • A table is a predesigned database that includes professionally designed database objects.
    12·1 answer
  • Suppose an initially-empty queue Q has performed a total of 32 enqueue operations, 10 front operations, and 15 dequeue operation
    14·1 answer
  • What component is most likely to be installed in a PC, is considered primary storage, and typically stores the operating system,
    6·1 answer
  • In order to view the permissions assigned to each type of user for all the files located in a directory, which of the following
    12·1 answer
  • What is an Action Button?
    10·1 answer
  • How did New York Governor Hugh Carey handle Sostre’s situation?
    9·2 answers
  • We begin with a computer implemented in a single-cycle implementation. When the stages are split by functionality, the stages do
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!