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 |
1.what is verifacation,validation,how its achieved? 2.What is test techniques& strategy? 3.what is error,fault,failure? 4.what is Reviews,Walkthrough,Inspection & Audit? 5.What is Change management,Configuration management,Version control,Test harness? 6.Importance of Severity,Priority,explain Bug life cycle? 7.Difference between use case & test case with example? 8.When should stop testing? 9.Write a test case for online banking application in the topics user login,security,transaction to other accout,data protection. 10.If the software is tested but all the bugs was not fixed,will you release this software?If yes/No then why?
On what basis is the Acceptance plan prepared?
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
How do you estimate white box testing?
a apllication is given to you but the requirements and functionalities are missing what will you do to start the testing?
TELL ABOUT CMM & ISO LEVELS ? its URGENT plz
Explain the difference between decision coverage and condition coverage ? If possible provide few examples.
what is a test case?
Hi everybody. In an interview i was asked to write the ECP for the range (1-10).
plz explain about commonly used terms while writing testcases.Like to check,validate,on click etc.
Explain what makes a good test engineer?
how many levels of regression testing is avilable in our testing process?