Answer Posted / vignesh1988i
#include<stdio.h>
#include<conio.h>
void main()
{
char a[40],temp;
int count=0;
printf("enter the string :");
gets(a);
for(int i=0;a[i]!='\0';i++)
count++;
for(i=0;a[i]!='\0';i++)
{
if(count>i)
{
temp=a[i];
a[i]=a[count-1];
a[count-1]=temp;
count--;
}
else
break;
}
printf("the reversed ones is : ");
puts(a);
getch();
}
thank u
| Is This Answer Correct ? | 9 Yes | 21 No |
Post New Answer View All Answers
What is a file descriptor in c?
Can main () be called recursively?
Write a program to check armstrong number in c?
In c language can we compile a program without main() function?
Explain continue keyword in c
Why c is a mother language?
Where can I get an ansi-compatible lint?
Describe the order of precedence with regards to operators in C.
main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above
Can you explain the four storage classes in C?
What is indirection? How many levels of pointers can you have?
How do you define a string?
Can the sizeof operator be used to tell the size of an array passed to a function?
How can you draw circles in C?
What is the scope of static variable in c?