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 is the significance of an algorithm to C programming?
How can you allocate arrays or structures bigger than 64K?
How to write a code for reverse of string without using string functions?
why wipro wase
What is define directive?
What is #include stdlib h?
What is anagram in c?
Can a program have two main functions?
What is volatile keyword in c?
Write a program which returns the first non repetitive character in the string?
What is the use of gets and puts?
What is scope and lifetime of a variable in c?
What are the features of c language?
How can I change their mode to binary?
i want to switch my career from quailty assurance engineering to development kindly guide me from which programming language its better for me to start plz refer some courses or certifications too i have an experience of 1.5 yrs in QA field.Kindly guide me