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 |
Have you worked in UDAP (Credit Card act 2009) project?What did you test in Billing & Payment modules?
Have you ever completely tested any part of a product? How?
I have password field in my application.while entering data into pwd field the characters are not encrypted will it come under gui testing or unit testing? is gui testing checked by typing or entering data into fields?
write testcase for print option using mswod
what is the part of qa and qc in refinement v model.
how to write test case in testing give some examples plz help me any one?
9.Data – driver automation typically includes?
how testing is carried out in real time agile methodology i mean to say how a job is assigned to one tester in a team
1. can u explain about testing levels and its type with example? 2. First explain about both testing.then difference B/W sanity and smoke testing? 3. Explain about integration , functional , system testing? 4. what are methods use to writing test cases?
how can we do database testing. In database testing we verify the data integrity and data validation. how can we do testing of Index, triggers, views, ransactions,cursors etc
Test cases for 1Ltr water bottle
If project wants to release in 3months what type of risk analysis you do in test plan?