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

Explain the advantages and disadvantages of macros.

612


Explain what is wrong in this statement?

624


How can you find the day of the week given the date?

607


the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above

597


How are Structure passing and returning implemented by the complier?

701






Tell me can the size of an array be declared at runtime?

589


What is #define used for in c?

604


Do you know pointer in c?

575


What is typedef example?

607


Is swift based on c?

625


what do you mean by enumeration constant?

588


write a program to generate address labels using structures?

3996


What is identifier in c?

535


Explain the use of keyword 'register' with respect to variables.

584


Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.

1611