write function to reverse char array ... without using second
array
Answer Posted / nagesh r. dalave
void main()
{
char strp20];
int len=0,i=0;
printf("\nEnter a string ");
gets(str);
while(str[i]!='\0')
{
i++;
len++;
}
printf("\nReverse of given string:");
while(i>=0)
{
printf("\n %c",str[i]);
i--;
}
getch();
}
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is integer constants?
If the size of int data type is two bytes, what is the range of signed int data type?
Is c a great language, or what?
Write a program to check armstrong number in c?
Tell me what are bitwise shift operators?
Explain two-dimensional array.
What is switch in c?
if p is a string contained in a string?
Can you mix old-style and new-style function syntax?
Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10
What is the difference between void main and main in c?
What are the application of c?
What is the maximum no. of arguments that can be given in a command line in C.?
What is the easiest sorting method to use?
What is c variable?