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
Compare array data type to pointer data type
Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?
How can I invoke another program or command and trap its output?
How are variables declared in c?
What are conditional operators in C?
any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above
What is volatile c?
Can you write the algorithm for Queue?
1) write a program to generate 1st n fibonacci prime numbers using Nested if 2) write a program to generate twin prime numbers from m to n using nested if 3) write a program to check whether a given integer is a strong number or not using nested if 4) Write a program to generate prime factors of a given integer using nested if 5)write a program to generate prime numbers from m to n using nested if 6)write a program to generate perfect numbers from m to n using nested if 7)write a program to generate the pallindromes from m to n using neste if 8)write a program to generate armstrong numbers from m to n using nested if 9)write a program to generate strong numbers from m to n using nested if
Explain the difference between call by value and call by reference in c language?
What does malloc () calloc () realloc () free () do?
What are the uses of null pointers?
Why is it usually a bad idea to use gets()? Suggest a workaround.
Explain how are portions of a program disabled in demo versions?
How can I direct output to the printer?