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
laiz [17]
3 years ago
7

Int a = 1; int b = 0; int c = -1; if ((b + 1) == a) { b++; c += b; } if (c == a) { a--; b = 4; }

Computers and Technology
1 answer:
dimulka [17.4K]3 years ago
8 0

Answer:

a = 1

b = 1

c = 0

Explanation:

Given

The above code segment

Required

The final values of a,\ b\ \&\ c

The following line declares and initializes the values of a, b and c

int a = 1;     int b = 0;     int c = -1;

So, we have:

a = 1; b =0; c = -1

Next, the following if condition is tested

if ((b + 1) == a)

b + 1 =0 +1

b + 1 = 1

And:

a = 1

So,

b + 1 = a = 1

Since the condition is true, the statements in the curly brace { } will be executed;

b++ \to b = b+1 \to b = 0 + 1 \to b = 1

So:

b = 1

c += b \to c = c+b \to c = -1 + 1 \to c = 0

So:

c = 0

Next, the following if condition is tested

c == a

c = 0 and a =1

So:

c \ne a

That means, the statements in its curly brace will not be executed.

So, the final values of a, b and c are:

a = 1

b = 1

c = 0

You might be interested in
Which option is used in Access to locate and retrieve data that may be present in multiple database tables within the database?
rosijanka [135]

Answer:

subroutines

Explanation:

subroutines is used in access to locate and retrieve data

5 0
3 years ago
Will a company ever finish its social media marketing strategy?
aleksley [76]
No.

This is because a social media company must always continue to adapt to new trends and marketing techniques in order to remain relevant to the community.

Hope this helps!
6 0
4 years ago
What is the difference between ReactJS and AngularJS
Vadim26 [7]

Explanation:

The primary difference between AngularJS and ReactJS lies in the state of its management. AngularJS has data binding bundled in by default, whereas React is generally augmented by Redux to give unidirectional data flow and work with immutable data. Mark Brainliest

5 0
3 years ago
Read 2 more answers
For the question below, refer to the following recursive factorial method.
Mashcka [7]

Answer:

(d) 6

Explanation:

When we call factorial(3) first it will check if it greater than 1 since it is greater then return 3*factorial(2) will be called on factorial(2) it will again check that 2>1 since it is greater then return 2*factorial(1) will be called.In factorial(1) we have is not greater than 1 so it will return 1.return 2*factorial(1) will return 2 and 2 that is returned by factorial(2) will be multiplied with 3.So it will return 6.

8 0
4 years ago
A chart generated in Microsoft Excel can be plugged into a presentation authored used PowerPoint?
zlopas [31]

The answer is True.  A chart generated in Microsoft Excel can be plugged into a presentation authored used Powerpoint.    You can copy it from Excel ( by right-clicking on the chart and select copy) and then Paste it in Power Point.  Or, you can save it and import it as an image.

8 0
3 years ago
Other questions:
  • If an employee who needs eye protection wears prescription lenses he or she should
    14·1 answer
  • What command will disable dns lookup to prevent the router from attempting to translate incorrectly entered commands as though t
    6·1 answer
  • How many words fit on a double-spaced page?
    11·1 answer
  • Why can a "group by" or "order by" clause be expensive to process? What is the difference between a where and having clause?
    14·1 answer
  • Mark for review (Will be highlighted on the review page) 11. A feature in Excel that allows you to graphically display in a sing
    10·1 answer
  • During the _______ steps of the information processing cycle, data is manipulated, calculated, or organized to create useful inf
    9·1 answer
  • 2. Choose all of the correct answers for each of the following: [a] The relations of two sub-entity sets of the same super entit
    6·1 answer
  • Sketch f(x) = 5x2 - 20 labelling any intercepts.​
    13·1 answer
  • FREE BRAINLIEST!!!
    14·2 answers
  • Which of the following best describes a balanced reaction
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!