Answer:
Code is given below:
Explanation:
.data
str1: .space 20
str2: .space 20
msg1:.asciiz "Please enter string (max 20 characters): "
msg2: .asciiz "\n Please enter string (max 20 chars): "
msg3:.asciiz "\nSAME"
msg4:.asciiz "\nNOT SAME"
.text
.globl main
main:
li $v0,4 #loads msg1
la $a0,msg1
syscall
li $v0,8
la $a0,str1
addi $a1,$zero,20
syscall #got string to manipulate
li $v0,4 #loads msg2
la $a0,msg2
syscall
li $v0,8
la $a0,str2
addi $a1,$zero,20
syscall #got string
la $a0,str1 #pass address of str1
la $a1,str2 #pass address of str2
jal methodComp #call methodComp
beq $v0,$zero,ok #check result
li $v0,4
la $a0,msg4
syscall
j exit
ok:
li $v0,4
la $a0,msg3
syscall
exit:
li $v0,10
syscall
methodComp:
add $t0,$zero,$zero
add $t1,$zero,$a0
add $t2,$zero,$a1
loop:
lb $t3($t1) #load a byte from each string
lb $t4($t2)
beqz $t3,checkt2 #str1 end
beqz $t4,missmatch
slt $t5,$t3,$t4 #compare two bytes
bnez $t5,missmatch
addi $t1,$t1,1 #t1 points to the next byte of str1
addi $t2,$t2,1
j loop
missmatch:
addi $v0,$zero,1
j endfunction
checkt2:
bnez $t4,missmatch
add $v0,$zero,$zero
endfunction:
jr $ra
Answer: Because MM's CEO, Crosscut Sal, is a stickler for keeping machinery running, the company stocks quick-change replacement modules for the two most common ..
Explanation:
Answer:
These drive fittings come in four common sizes: 1⁄4 inch, 3⁄8 inch, 1⁄2 inch, and 3⁄4 inch (referred to as "drives", as in "3⁄8 drive").
Answer:
1790 μrad.
Explanation:
Young's modulus, E is given as 10000 ksi,
μ is given as 0.33,
Inside diameter, d = 54 in,
Thickness, t = 1 in,
Pressure, p = 794 psi = 0.794 ksi
To determine shear strain, longitudinal strain and circumferential strain will be evaluated,
Longitudinal strain, eL = (pd/4tE)(1 - 2μ)
eL = (0.794 x 54)(1 - 0.66)/(4 x 1 x 10000)
eL = 3.64 x 10-⁴ radians
Circumferential strain , eH = (pd/4tE)(2-μ)
eH = (0.794 x 54)(2 - 0.33)/(4 x 1 x 10000)
eH = 1.79 x 10-³ radians
The maximum shear strain is 1790 μrad.
An expertly designed format for arranging, processing, accessing, and storing data is called a data structure.
Data structures come in both simple and complex forms, all of which are made to organize data for a certain use. Users find it simple to access the data they need and use it appropriately thanks to data structures. The organizing of information is framed by data structures in a way that both machines and people can better grasp. A data structure may be chosen or created in computer science and computer programming to store data in order to be used with different methods. In some circumstances, the design of the data structure and the algorithm's fundamental operations are closely related. Each data structure comprises information about the data values, relationships between the data and — in some situations — functions that can be applied to the data. For instance, in an object-oriented programming language, the data structure and its related methods are tied together as part of a class description. Although they may be designed to operate with the data structure in non-object oriented languages, these functions are not considered to be a part of the data structure. A data structure may be chosen or created in computer science and computer programming to store data in order to be used with different methods. In some circumstances, the design of the data structure and the algorithm's fundamental operations are closely related. Each data structure comprises information about the data values, relationships between the data and — in some situations — functions that can be applied to the data.
Know more about data structure here:
brainly.com/question/29487957
#SPJ4