write a program in reverse the string without using
pointer,array,global variable declaration,lib fun only using
a function?
Answer Posted / sanjay
#include<stdio.h>
int main()
{
char a[10],b[10];
int i,c=0;
printf("Enter string");
scanf("%s",a);
for(i=0;a[i]!='\0';i++)
{
c=c+1;
}
for(i=c-1;i>=0;i--)
{
b[j]=a[i];
j++;
}
b[j]='\0';
printf("Reverse the string %s",b);
return 0;
}
| Is This Answer Correct ? | 6 Yes | 11 No |
Post New Answer View All Answers
What functions are in conio h?
Is it possible to execute code even after the program exits the main() function?
What does the c in ctime mean?
Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop
What does != Mean in c?
Why is sprintf unsafe?
How can I access an I o board directly?
If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?
How is null defined in c?
What is dynamic dispatch in c++?
Explain how can you determine the size of an allocated portion of memory?
What is extern keyword in c?
a linearly ordered set of data elements that have the same structure and whose order is preserved in storage by using sequential allocation a) circular b) ordinary c) array d) linear list
What is sorting in c plus plus?
what are enumerations in C