SAP Certified Associate – ABAP Cloud Developer — Question 10
Which function call returns 0?
Answer options
- A. find_any_of( val = ‘ABAP ABAP abap’ sub = ‘AB’ )
- B. count( val = ‘ABAP ABAP abap’ sub = ‘AB’ )
- C. count_any_of( val = ‘ABAP ABAP abap’ sub = ‘AB’ )
- D. find_any_not_of( val = ‘ABAP ABAP abap’ sub = ‘AB’ )
Correct answer: D
Explanation
The correct answer is D because the function find_any_not_of checks for characters not present in the substring 'AB', which in this case results in 0 matches from the original string. The other options (A, B, and C) involve finding occurrences of 'AB' or counting them, which would return a positive count instead of 0.