Answer:
I have got no idea it looks like an older style
Answer:
Option B: a[k] = 20, a[k + 1] = 10 is the correct answer.
Explanation:
We will dry run the pseudocode line by line and monitor the values stored in elements to get the final answer.
We have three elements to be used in the code.
a[k] , a[k+1] and temp
a[k] = 10;
This line assigns value 10 to a[k]
a[k+1] = 20;
This line assigns value 20 to a[k+1]
temp = a[k];
This line will assign the value in a[k] to temp i.e. we have following values currently stored at the three locations a[k] = 10, a[k+1] = 20 and temp = 10
a[k] = a[k+1] ;
This line of code assigns the value of a[k+1] to a[k] which means now we have a[k] = 20 , a[k+1] = 20 and temp =10
a[k+1] = temp ;
This line will assign the value in temp to a[k+1] which means now we have
a[k] = 20 , a[k+1] = 10 and temp = 10
Hence, looking at the final values in a[k] and a[k+1] it can be concluded that
Option B: a[k] = 20, a[k + 1] = 10 is the correct answer
Answer: The FP-s are stored as sign (1.)111111111111 - number of bits.
Also 24 bits resolution there can be 23 zeros
Explanation:
The –1·2²⁴ might be stored as -1 · 1.00000000000000000000000(1 ←the 2⁰), it depends on how the FFP “engine” manages this, it may also be code specific a n+1–n does return 1 but 1–n+n does not. you should carry out a test for a specific compiler/computer
This is what javascript does with double (k+=1; n-=1) e.g
the (k+=2; n-=2) should be used to pass ±0x20000000000000
The python program that creates a Bankaccount class for a Bank ATM that is made up of the customers and has a deposit and withdrawal function is given below:
<h3>Python Code</h3>
# Python program to create Bankaccount class
# with both a deposit() and a withdraw() function
class Bank_Account:
def __init__(self):
self.balance=0
print("Hello!!! Welcome to the Deposit & Withdrawal Machine")
def deposit(self):
amount=float(input("Enter amount to be Deposited: "))
self.balance += amount
print("\n Amount Deposited:",amount)
def withdraw(self):
amount = float(input("Enter amount to be Withdrawn: "))
if self.balance>=amount:
self.balance-=amount
print("\n You Withdrew:", amount)
else:
print("\n Insufficient balance ")
def display(self):
print("\n Net Available Balance=",self.balance)
# Driver code
# creating an object of class
s = Bank_Account()
# Calling functions with that class object
deposit()
s.withdraw()
s.display()
Read more about python programming here:
brainly.com/question/26497128
#SPJ1