Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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.



design a black box test suite for a program that accepts two strings and checks if the first strin..

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

Post New Answer

More Manual Testing Interview Questions

What is Internalisation testing?

3 Answers   Keane India Ltd,


recently, i attended for one interview. in that they asked for project explanation. i explained that project. after that they ask me to write test scenarios for that? in real time i don't know how to write test scenarios. can any one please write test scenarios for the following given project. Health care solutions This project mainly deals with Hospital Management System. There are different modules, each module contain different functionality. They are Appointment Scheduling, Registration, Visit & Admission, Out & In Patient Service Management, Lab Management, Bill Handling, Patient Notes, Blood Bank, Master Setup & Security Module, and Pharmacy Quotations.

3 Answers  


While doing system testing your have missed out some issues. The same issue is found by customer and he reverts back to you for an explaination. How do you convince him or how do you justify yourself about your testing?

2 Answers   HP,


What is accessibility testing

18 Answers   Aspire,


Explain about 'Interface Testing' in Web based Application?

1 Answers   Crea,


In the static testing,what all can be tested?

2 Answers  


types of reviews

9 Answers   AZTEC,


What is mutation testing?? And when we use it??

2 Answers   IBM,


cAN ANY ONE PLEASE EXPLAIN THESE TERMS AND THEIR RELATION : BALCKBOX TESTING, FUNCTIONAL TESTING, FUNCTIONALITY TESTING, SYSTEM TESTING....... AND TEST METHODOLOGIES, TESTING TECCHNOLOGIES, TESTING TYPE.....

5 Answers   IBM,


1. Test granularity refers to: a. Any way of determining the expected result for a test case. b. A quality improvement idea common in software development. c. The fineness or coarseness of a test’s focus. d. The impact of a bug on the system under

3 Answers  


Hi to all..Now am working at one company as Software tester..I have selected for Accenture via one consultancy.. They have told that joining date will be on 19 th july..But now they are postponed joining date..whether i can trust that or not?Can u plz tell??plzz..whether i can put my paper to releive or not? CAn u telll?

0 Answers  


How can u do the performance testing?

2 Answers   Wipro,


Categories