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 void pointers in c?
Why string is used in c?
What is the use of getchar() function?
Explain b+ tree?
What does c mean?
how should functions be apportioned among source files?
Explain the term printf() and scanf() used in c language?
write a program to print data of 5 five students with structures?
Process by which one bit pattern in to another by bit wise operation is?
How do you generate random numbers in C?
Why enum is used in c?
What is assignment operator?
Explain can the sizeof operator be used to tell the size of an array passed to a function?
write a progrmm in c language take user interface generate table using for loop?
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?