write function to reverse char array ... without using second
array
Answer Posted / sunitha
/* function to reverse a charactor array */
void rev_array(char str[])
{
char c;
char *p;
p=str;
while(*p)
{
if(*p!='\0')
{
c=p;
}
p++;
}
printf("reverse array is %s\n",c);
}
| Is This Answer Correct ? | 1 Yes | 7 No |
Post New Answer View All Answers
What is c standard library?
Why is sprintf unsafe?
Explain how can I convert a number to a string?
Why are some ANSI/ISO Standard library routines showing up as undefined, even though I've got an ANSI compiler?
Write a program on swapping (100, 50)
Once I have used freopen, how can I get the original stdout (or stdin) back?
Which is best book for data structures in c?
What does sizeof int return?
There is a practice in coding to keep some code blocks in comment symbols than delete it when debugging. How this affect when debugging?
What is a void pointer? When is a void pointer used?
State the difference between x3 and x[3].
How can variables be characterized?
pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)
What are the __date__ and __time__ preprocessor commands?
What is derived datatype in c?