write function to reverse char array ... without using second
array

Answer Posted / kiran

{
char temp;
for(i,j=strlen(str)-1;i<j;i++,j--)
{
temp = str[i];
str[i] = str[j];
str[j] = temp;
}
return str;
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is union and structure?

569


What is restrict keyword in c?

643


Create a simple code fragment that will swap the values of two variables num1 and num2.

808


How can I invoke another program or command and trap its output?

612


What is a stream water?

654






How do I get an accurate error status return from system on ms-dos?

647


a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.

4543


What is an auto keyword in c?

641


how to solve "unable to open stdio.h and conio.h header files in windows 7 by using Dos-box software

2792


What does nil mean in c?

669


given post order,in order construct the corresponding binary tree

2321


What are the types of unary operators?

659


What standard functions are available to manipulate strings?

560


What is static memory allocation? Explain

630


Explain what will be the outcome of the following conditional statement if the value of variable s is 10?

740