Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is sizeof int?

1108


How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?

1035


what is the height of tree if leaf node is at level 3. please explain

2153


Explain what is wrong in this statement?

1126


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

1157


What is size of union in c?

1028


What are type modifiers in c?

1056


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.

2096


Explain what is the benefit of using const for declaring constants?

1040


How do we declare variables in c?

1070


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)

2128


By using C language input a date into it and if it is right?

1087


What is difference between union and structure in c?

1170


What is an lvalue?

1066


can any one provide me the notes of data structure for ignou cs-62 paper

2179