If the following pseudocode was coded and executed, what would display?

```
Declare String str = "a1b2c3d4"
Declare Integer index
Declare Integer num = 0
For index = 0 To length(str) - 1
   If isDigit(str[index]) Then
      Set num = num + index
   End If
End For
Display num

```

a.15
b. 8
c.16
d. 28


Ans: c. 16

Computer Science & Information Technology

You might also like to view...

Which of the following data types may be used in a switch statement?

a. int b. char c. enum d. long e. all of the above f. a and d

Computer Science & Information Technology

Hunt performs sniffing in addition to session hijacking.?

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Once the top-down design approach is taken, the ________ approach is useful in programming.

A) modular B) system-wide C) feedback D) database design

Computer Science & Information Technology

_________ is a standard that uses text characters to define the meaning, structure, and appearance of data

A) Extensible Markup Language B) Data Interchange Format C) HyperText Language D) Portable Document Format

Computer Science & Information Technology