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
Is a house a mass structure?
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
Why is main function so important?
What is the total generic pointer type?
What is a stream?
What is the purpose of void in c?
What is #pragma statements?
How do we declare variables in c?
where are auto variables stored? What are the characteristics of an auto variable?
What is the use of volatile?
Explain what math functions are available for integers? For floating point?
What are the different types of C instructions?
What is the purpose of sprintf?
What is 1f in c?
Are there constructors in c?