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
What is the benefit of using an enum rather than a #define constant?
any "C" function by default returns an a) int value b) float value c) char value d) a & b
How do I swap bytes?
What is the maximum no. of arguments that can be given in a command line in C.?
What is function prototype in c with example?
What are dangling pointers in c?
What is the advantage of c?
Here is a neat trick for checking whether two strings are equal
about c language
#include
What is 2c dna?
Do character constants represent numerical values?
Why do we use int main?
How many levels of pointers can you have?
How many types of sorting are there in c?