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
fgiga [73]
3 years ago
12

Int [] val = { 3, 10, 44 };

Computers and Technology
1 answer:
irina1246 [14]3 years ago
4 0

Answer:

5) 3 0 0

Explanation:

Given data

int [] val = { 3, 10, 44 };

The total number of parameters of given array are 3, so total length of array is also 3.

The indexing of array starts with '0', Therefore the indexes of array with length zero are: {0,1,2}

The value of array at index 0 is = 3

similarly

value at index 1 = 10

value at index 2 = 44

Here, Int i = 1 is storing the value '1' in integer variable i.

In addition to that, any value of index 'i' of an array is selected using array[i].

Therefore,

val[i] = i-1 is copying the value (i-1 = 1-1 = 0) to the index '1'  of the array because i = 1.

So value at index 1 would be = val[1] = 0

The term i++ is incrementing the value of i, it makes i =2

val[i] = i-1 is copying the value (i-1 = 1-1 = 0) to the index '2' of the array because i = 2 now.

So value at index 2 would be = val[2] = 0

Hence, the output would be {3 0 0}. So 5th option is correct.

You might be interested in
GAMER OYUNCU KOLTUĞU % YERLİ
rewona [7]

Answer:

what does that even say omg

3 0
4 years ago
What are minimum computer requirements for a software program?
Bumek [7]
<span><span>Operating system: Windows 2000/XP
</span><span>CPU: Pentium 4 1.5 GHz or Athlon XP 1500+ processor or higher
</span><span>Memory: 384 MB RAM</span></span>
8 0
4 years ago
Write a program that asks the user to enter five different, integer numbers. The program then reports the largest number and the
Akimi4 [234]

Answer:

// here is code in C++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

// variables

  int minn=INT_MAX;

   int maxx=INT_MIN;

   int n1,n2,n3,n4,n5;

   cout<<"enter five Numbers:";

   //read 5 Numbers

   cin>>n1>>n2>>n3>>n4>>n5;

   // find maximum

   if(n1>maxx)

    maxx=n1;

    if(n2>maxx)

    maxx=n2;

    if(n3>maxx)

    maxx=n3;

    if(n4>maxx)

    maxx=n4;

    if(n5>maxx)

    maxx=n5;

   // find minimum

   if(n1<minn)

    minn=n1;

    if(n2<minn)

    minn=n2;

    if(n3<minn)

    minn=n3;

    if(n4<minn)

    minn=n4;

    if(n5<minn)

    minn=n5;

   // print maximum and minimum

   cout<<"maximum of five numbers is: "<<maxx<<endl;

   cout<<"minimum of five numbers is: "<<minn<<endl;

return 0;

}

Explanation:

Declare two variables "minn" & "maxx" and initialize them with INT_MAX and INT_MIN respectively.Then read the five number from user and compare it with "minn" & "maxx" ,if input is greater than "maxx" then update "maxx" or if input is less than "minn" then update the "minn". After all the inputs, "minn" will have smallest and "maxx" will have largest value.

enter five Numbers:5 78 43 55 12

maximum of five numbers is: 78

minimum of five numbers is: 5

4 0
3 years ago
If you want to develop an Android app, you need to become a registered developer with which platform?
Orlov [11]
C is the correct answer
3 0
3 years ago
PLEASE HELP!
Gnom [1K]

Answer:

A. True or false

1.True

2.false

3.false

4.true

5.true

4 0
2 years ago
Read 2 more answers
Other questions:
  • A. When executing System.out.println(a1), the toString() method in the Object class is invoked.
    14·1 answer
  • How to hack the school system
    12·1 answer
  • An app for a hair styling stop needs a form for the various services that they offer. What control should be used to display all
    6·1 answer
  • After reading the article, "The Impact of Technology", answer the following question.
    14·1 answer
  • Si restablesco de fabrica mi pc se borra la bios o no ? ayuda (no puedo acceder ala bios por ninguna forma )
    9·1 answer
  • Chapter
    15·1 answer
  • 4.5 code practice edhesive
    15·1 answer
  • The following Mic1 microcode excerpt shows support for a possible 7 bit opcode, 8 bit integer argument machine instruction (orga
    14·1 answer
  • Write a program in Python to sum to numbers:<br><br> Urgently needed, please.
    14·1 answer
  • When a support agent does not know the answer to a question, a good incident management strategy is to tell the user ____.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!