Write a program to write a given string in maximum
possibilities?
i.e str[5]="reddy";
i.e we can write this string in 120 ways
for that write a program
Answer Posted / sunil singh
Here is an example program...
#include "stdafx.h"
#include "string.h"
int recursive(int length)
{
if ( length <= 1 )
return 1;
else
return length*recursive(length-1);
}
int main(int argc, char* argv[])
{
char data[] = "ready";
printf("maximum possibilities - %d \n", recursive
(strlen(data)));
return 0;
}
Is This Answer Correct ? | 1 Yes | 4 No |
Post New Answer View All Answers
Can include files be nested?
Can we assign integer value to char in c?
What is a file descriptor in c?
Suggesting that there can be 62 seconds in a minute?
What is bubble sort in c?
Explain what is wrong in this statement?
What are the uses of null pointers?
Can we access array using pointer in c language?
What are global variables and how do you declare them?
Why do we use null pointer?
What is the difference between exit() and _exit() function?
What is the difference between array and structure in c?
Explain the difference between null pointer and void pointer.
What are pointers really good for, anyway?
Why is c faster?