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
Explain the advantages and disadvantages of macros.
Explain what is wrong in this statement?
How can you find the day of the week given the date?
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
How are Structure passing and returning implemented by the complier?
Tell me can the size of an array be declared at runtime?
What is #define used for in c?
Do you know pointer in c?
What is typedef example?
Is swift based on c?
what do you mean by enumeration constant?
write a program to generate address labels using structures?
What is identifier in c?
Explain the use of keyword 'register' with respect to variables.
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.