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 sizeof int?
How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?
what is the height of tree if leaf node is at level 3. please explain
Explain what is wrong in this statement?
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above
What is size of union in c?
What are type modifiers in c?
Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.
Explain what is the benefit of using const for declaring constants?
How do we declare variables in c?
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
By using C language input a date into it and if it is right?
What is difference between union and structure in c?
What is an lvalue?
can any one provide me the notes of data structure for ignou cs-62 paper