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 ? | 6 Yes | 3 No |
please help me to write sample tets cases for a List box
Write TestCases for mobile
At first time when you receive the application at that time which testing you do?
What are the properties of a good requirement?
Tell me about the best bug you ever found.
How we make scripts for unit testing with Nunit.
hello frens. Im Arun from the uk. im planning to apply for tester jobs with 3yrs experience. the problem is i dont have resumes. i have to mention atleast 3 projects (preferably financial projects) in my CV. im totally blank. can u plz send ur CV's to my email.... arunmoses1982@yahoo.com. this would be a great help from you guyz. n u need any help from me? just mail me n ill get in touch with u. Thanx.
Is Software Testing categorized as a technical or Non-technical job???
In an application currently in production, one module of code is being modified. Is it necessary to re- test the whole application or is it enough to just test functionality associated with that module?
3 Answers Media Magic, Ordain Solutions,
2.How are you going to map between Test Scenarios and Test Cases?
What is the difference between Functional testing and Functionality testing?
State a generalized process for load test? Or explain how you did it previously.