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
Which is the memory area not included in C program? give the reason
The number of measuring units from an arbitarary starting point in a record,area,or control block to some other point a) recording pointer b) offset c) branching d) none
Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)
Explain what is wrong with this program statement?
diff between exptected result and requirement?
What is d scanf?
Do string constants represent numerical values?
What is pass by value in c?
What are loops in c?
in multiple branching construct "default" case is a) optional b) compulsarily c) it is not include in this construct d) none of the above
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
What are terms in math?
Array is an lvalue or not?
Explain how do I determine whether a character is numeric, alphabetic, and so on?
A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(