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 functions are in conio h?

1172


Is it possible to execute code even after the program exits the main() function?

1316


What does the c in ctime mean?

1073


Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop

2136


What does != Mean in c?

1031


Why is sprintf unsafe?

1053


How can I access an I o board directly?

1077


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?

1240


How is null defined in c?

1139


What is dynamic dispatch in c++?

1041


Explain how can you determine the size of an allocated portion of memory?

1095


What is extern keyword in c?

1112


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

1047


What is sorting in c plus plus?

959


what are enumerations in C

1142