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 |
How to write gui test cases ? plz gve me some sugessition about gui test cases along with examples plz plz any one plz
Which methodologies, Technologies are fallowed in your company?
pl. give me the list of top jobs website to register i have 2Yrs. Experience in manual testing
which out of the following can be considered as performance testing:- 1. Benchmarking 2.Recovery testing 3. more than one user testing
what is analysizing test results & creating the bug reportts?
1.What are the difference b/w client & server?
Use of Requirements Traceability?
what is test plan
What is Deep Structure Testing?
Hi my name is surbhi. I am a commerce graduate and doing Testing course. I want to make my career in it industry. But right now i m full confused dnt know from where to Start what to do. I cant stay without job also. Write now Working in a hotel. Pls suggest me? How to make my carreer In testing and is there any jobs for freshers in bangalore
what is the diff b/n testing methodologies and testing techniques?
iam new testing, i want improve writing test cases and bug defect etc? any on give suggestion pls?