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 fortran still used today?
write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?
write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34
Tell me can the size of an array be declared at runtime?
Is a house a shell structure?
What is variables in c?
What is a protocol in c?
What is the default value of local and global variables in c?
What is the difference between #include
How can I write a function that takes a format string and a variable number of arguments?
How can I discover how many arguments a function was actually called with?
Write a program to check prime number in c programming?
Do you have any idea how to compare array with pointer in c?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?