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


Please Help Members By Posting Answers For Below Questions

Can include files be nested?

631


Can we assign integer value to char in c?

619


What is a file descriptor in c?

568


Suggesting that there can be 62 seconds in a minute?

601


What is bubble sort in c?

640






Explain what is wrong in this statement?

638


What are the uses of null pointers?

595


Can we access array using pointer in c language?

650


What are global variables and how do you declare them?

623


Why do we use null pointer?

609


What is the difference between exit() and _exit() function?

610


What is the difference between array and structure in c?

573


Explain the difference between null pointer and void pointer.

675


What are pointers really good for, anyway?

621


Why is c faster?

596