Question: What will be the value of $v 0 if string was Hel . data string: . asciiz Hello!!! . text main: la $a 0 ,
What will be the value of $v if string was "Hel"
data
string: asciiz "Hello!!!"
text
main:
la $a string
jal stringlength
li $v
syscall
stringlength:
li $v
countloop:
lb $t$a
beqz $t countexit
addi $a $a
addi $v $v
j countloop
countexit:
jr $ra
None of the above
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
