design a black box test suite for a program that accepts
two strings and checks if the first string is a substring
of the second string and displays the number of times the
first string occurs in the second string.
Answer / bhupndra
#include<stdio.h>
#include<conio.h>
int main()
{
int i=0,j=0,k=0,count=0,l=0,k1=0;
char a[80],b[80];
clrscr();
printf("\nEnter main string:-\n");
gets(a);
printf("\nEnter sub-string:-\n");
gets(b);
l=strlen(b);
while (a[i]!=EOF)
{
if (a[i]==b[j])
{
i++;
j++;
k1=1;
if (j==l)
{
j=0;
k=1;
count=count+1;
}
}
else
{
if (k1==1)
{
j=0;
k1=0;
}
else
i++;
}
}
if (k==1)
{
printf("\n\nThe given sub-string is present in the main
string.");
printf("\nIt is present %d times.",count);
}
else
{
if (k==0)
printf("\n\nThe given sub-string is not present in the
main string.");
}
}
Is This Answer Correct ? | 10 Yes | 3 No |
Write TestCases for mobile
2. The prime benefit of testing is that it results in improved defects a. True b. False
what is the difference between bug and issue?
what is the decission table?
I have 2 yrs 10 months experience in manual testing. there is a gap of 3 yrs in between. just 3 months before i rejoined the same company. I am looking for new & better job.What I have to enhance my career to up level, should I have to do Automation course or any other. Guide me properly.
there is a mobile phone and it has got 2 buttons one is it takes photo other is it uploads photo to facebook how to you test this application ?
7 Answers CTS, Murugappa Group,
Which method of testing we use to test LOGIN page?
How much the bug is affecting the functionality of the application?
1] Test Management Tool ? 2] What is tracebility Matrix? 3] What is RTM ? 4] What Is Functional testing 5] What is Regration Testing and Sanity Testing 6] Diff in Sanity and Functional Tetsing 7] Integration Tetsing 8] Diff in Primary Key and Unique Key -Should pass primary Key as null 9] What is composit Key 10] Defect Management tool in detail 11] What is Seviarity and Priority 12] Composite Key
What is difference between Sanity Testing & smoke Testing?
i got my Quality center cd from Nageswararao institute?can any body help me how to install it?
6 what do you like least about testing?