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
Find the area of square whose perimeter is 260.8m​
inessss [21]
4251.04

The perimeter (260.8) over 4 is equal to each side length (65.2)

65.2^2 = 4251.04
5 0
2 years ago
Is technology a legal discipline or law is a technological artifact.
ANEK [815]

Answer:Technology law scholars have recently started to consider the theories of affordance and technological mediation, imported from the fields of psychology, human-computer interaction (HCI), and science and technology studies (STS). These theories have been used both as a means of explaining how the law has developed, and more recently in attempts to cast the law per se as an affordance. This exploratory paper summarises the two theories, before considering these applications from a critical perspective, noting certain deficiencies with respect to potential normative application and definitional clarity, respectively. It then posits that in applying them in the legal context we should seek to retain the relational user-artefact structure around which they were originally conceived, with the law cast as the user of the artefact, from which it seeks certain features or outcomes. This approach is effective for three reasons. Firstly, it acknowledges the power imbalance between law and architecture, where the former is manifestly subject to the decisions, made by designers, which mediate and transform the substance of the legal norms they instantiate in technological artefacts. Secondly, from an analytical perspective, it can help avoid some of the conceptual and definitional problems evident in the nascent legal literature on affordance. Lastly, approaching designers on their own terms can foster better critical evaluation of their activities during the design process, potentially leading to more effective ‘compliance by design’ where the course of the law’s mediation by technological artefacts can be better anticipated and guided by legislators, regulators, and legal practitioners.

Keywords

Affordance, technological mediation, postphenomenology, legal theory, compliance by design, legal design

7 0
3 years ago
Write the pseudocode for a program that will process attendance records of CA students. The students attend college five days a
Alenkasestr [34]

Using the knowledge of pseudocodes it will be possible to write a code that calculates the amount of hours worked and giving warnings about it.

<h3>Writing a pseudocode we have that:</h3>

<em>while </em>

<em>if number == 0</em>

<em>break</em>

<em>hours =0 </em>

<em>for i =1 to 5 </em>

<em>hours = hours + time_out[ i ] - time_in[ i ]</em>

<em> If hours >36 : </em>

<em>print ( "Name is " ,name)</em>

<em>print( "No of hours are ",hours)</em>

<em>print("Congratulaion! Your working hours are more than 36")</em>

<em>If hours <30 : #</em>

<em>print ( "Name is " ,name)</em>

<em>print( "No of hours are ",hours)</em>

<em>print("Warning !!!")</em>

<em>End loop</em>

See more about pseudocode at brainly.com/question/13208346

#SPJ1

3 0
2 years ago
What is the correct keyboard shortcut to cut a cell value
vladimir2022 [97]

Answer:

Cntrl+X

Explanation:

Do it on your computer

4 0
2 years ago
100 points, PLEASE HELP...To generate numbers between and including -10 to 10 you would use:
Orlov [11]

Answer:

A number line?

6 0
3 years ago
Other questions:
  • What protocol suite below is the most commonly used protocol for local area network (lan) communication?
    8·1 answer
  • Why should the data in a reservation system that is constantly being updated be stored on a magnetic disk instead of a CD or DVD
    15·1 answer
  • When might be the best time to start saving for retirement?
    11·2 answers
  • 14 Convert the<br>following binary<br>numbers to decimal <br>0011​
    10·2 answers
  • How should work be allocated to the team in a Scrum project?
    13·1 answer
  • Good Morning! Please Help!
    15·1 answer
  • Help plz, u just gotta select all that apply :)
    15·1 answer
  • Old systems can be useful when designing new computer software.<br> True or False
    7·2 answers
  • Who is the best Attack on Titan Character?
    12·2 answers
  • What is 2+2 I need to know hurry
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!