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...

3. Program to print all possible substrings.

ex: String
S
St
Str
Stri
Strin
String
t
tr
tri
trin
tring
r

Answer Posted / nik

#include<stdio.h>
#include<conio.h>
#include<string.h>
int main(){
int i,j=0,k=0,n;
char str[50],str1[25],str2[25],temp;
puts("Enter String");
gets(str);
n=strlen(str);
for(i=0;i<n;i++){
for(j=i;j<n;j++){
for(k=j;k<n;k++){

printf("%c",str[k]);
}

printf("\n");
}

printf("\n");
}
getch();
}

Is This Answer Correct ?    15 Yes 21 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is ur strangth & weekness

2362


What is the difference between break and continue?

1438


Linked list is a Linear or non linear explain if linear how it working as a non linear data structures

2139


which type of aspect you want from the student.

2136


What is the ANSI C Standard?

1231


Is it possible to execute code even after the program exits the main() function?

1301


Can we declare a function inside a function in c?

1009


What is the general form of a C program?

991


Difference between goto, long jmp() and setjmp()?

1142


Can we declare variables anywhere in c?

967


What is methods in c?

1045


Explain what standard functions are available to manipulate strings?

1044


How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?

2069


What is structure padding in c?

1086


What is identifiers in c with examples?

1143