adspace


Write the test cases for instr function?

Answer Posted / Arti Sharma

'Test Case 1: haystack = "abcdef", needle = "a" => result should be 0nTest Case 2: haystack = "abcdef", needle = "xyz" => result should be nullnTest Case 3: haystack = "apple", needle = "pple" => result should be 1nTest Case 4: haystack = "", needle = "a" => result should be null'

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell about yourself and job ?

2652


Tell about current project ?

2842