pgm to reverse string using arrays i.e god is love becomes
love is god)
(assumption:only space is used for seperation of words)
no addtional memory used.i.e no temporary arrays can used.
Answer Posted / paaru
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()
{
char a[20],i;
printf("\n\nEnter the string:");
gets(a);
for(i=strlen(a)-1;i>=0;i++)
{
printf("%d"a[i]);
}
getch();
}
| Is This Answer Correct ? | 1 Yes | 7 No |
Post New Answer View All Answers
What is a null string in c?
How can a string be converted to a number?
What is a char c?
What does %c do in c?
differentiate built-in functions and user – defined functions.
What is extern c used for?
When should a far pointer be used?
Can include files be nested? How many levels deep can include files be nested?
What is realloc in c?
Can math operations be performed on a void pointer?
Differentiate fundamental data types and derived data types in C.
Why is c platform dependent?
How do I get a null pointer in my programs?
Can you please explain the difference between syntax vs logical error?
I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.