write a C code
to reverse a string using a recursive function, without
swapping or using an extra memory.
Answer Posted / valli
void reverse(char s[],int len)
{
putchar(s[len]);
len--;
if(len>=0)
reverse(s,len);
return;
}
| Is This Answer Correct ? | 49 Yes | 33 No |
Post New Answer View All Answers
the factorial of non-negative integer n is written n! and is defined as follows: n!=n*(n-1)*(n-2)........1(for values of n greater than or equal to 1 and n!=1(for n=0) Perform the following 1.write a c program that reads a non-negative integer and computes and prints its factorial. 2. write a C program that estimates the value of the mathematical constant e by using the formula: e=1+1/!+1/2!+1/3!+.... 3. write a c program the computes the value ex by using the formula ex=1+x/1!+xsquare/2!+xcube/3!+....
Which built-in library function can be used to match a patter from the string?
How many keywords (reserve words) are in c?
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
Why c is called procedure oriented language?
What is the maximum no. of arguments that can be given in a command line in C.?
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
What is an array in c?
What is a volatile keyword in c?
Explain what is a program flowchart and explain how does it help in writing a program?
Give differences between - new and malloc() , delete and free() ?
write a program to display all prime numbers
What is double pointer in c?
Why is %d used in c?
typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none