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
Why isnt any of this standardized in c?
How can I recover the file name given an open stream or file descriptor?
Write a program to use switch statement.
How many levels of indirection in pointers can you have in a single declaration?
What is s in c?
What is the purpose of type declarations?
What is the default value of local and global variables in c?
I need testPalindrome and removeSpace
#include
What do you mean by command line argument?
What is calloc()?
What are the benefits of organizational structure?
please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................
Explain low-order bytes.
i = 25;switch (i) {case 25: printf("The value is 25 ");case 30: printf("The value is 30 "); When the above statements are executed the output will be : a) The value is 25 b) The value is 30 c) The value is 25 The value is 30 d) none
What are shell structures used for?