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 / sr amit tyagi

#include<stdio.h>
#include<conio.h>
void main()
{
FILE *f;
char c;
clrscr();
f=fopen("string","w");
while((c=getchar())!=EOF)
{
putc(c,f);
}
fclose(f);
f=fopen("string","r");
fseek(f,-1L,2);
do
{
putchar(getc(f));
}
while(!fseek(f,-2L,1));
fclose(f);
getch();
}

Is This Answer Correct ?    0 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is a house a mass structure?

1052


a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if

1091


Why is main function so important?

1047


What is the total generic pointer type?

1109


What is a stream?

1078


What is the purpose of void in c?

992


What is #pragma statements?

1054


How do we declare variables in c?

1008


where are auto variables stored? What are the characteristics of an auto variable?

1019


What is the use of volatile?

1044


Explain what math functions are available for integers? For floating point?

1062


What are the different types of C instructions?

1245


What is the purpose of sprintf?

1067


What is 1f in c?

2570


Are there constructors in c?

970