write a program in reverse the string without using
pointer,array,global variable declaration,lib fun only using
a function?
Answers were Sorted based on User's Feedback
Answer / r.s.guptha
void reverse()
{
char c = getchar();
if(c=='\n' || c=='\r')
return;
else
reverse();
putchar(c);
}
int main()
{
reverse();
return 0;
}
| Is This Answer Correct ? | 4 Yes | 3 No |
Answer / reshma pawar
#include<stdio.h>
void main()
{
int i;
char a[]={"Hello"};
printf("Reverse String is: ");
for(i=4;i>=0;i--)
printf("%c",a[i]);
}
| Is This Answer Correct ? | 14 Yes | 15 No |
Answer / 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 |
#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 |
Answer / aravind
#include<stdio.h>
int main()
{
int i;
char a={"Hello"};
for(i=4;i>=0;i--)
printf("revese string=%c",a);
}
| Is This Answer Correct ? | 7 Yes | 32 No |
what is object oriental programing?
Explain can the sizeof operator be used to tell the size of an array passed to a function?
what are far pointers?
Why pointers are used?
What are global variables and how do you declare them?
What does typeof return in c?
code for concatination of 2 strings with out using library functions?
How can you check to see whether a symbol is defined?
Q.1 write a program to create binary tree 1 to 16 numbers? Q.2 write a program to creat a binary search tree for the member that is given by user?
what value is returned to operating system after program execution?
What is a far pointer?What is the utility?
#include<stdio.h> main() { int a[3]; int *I; a[0]=100;a[1]=200;a[2]=300; I=a; Printf(“%d\n”, ++*I); Printf(“%d\n”, *++I); Printf(“%d\n”, (*I)--); Printf(“%d\n”, *I); } what is the o/p a. 101,200,200,199 b. 200,201,201,100 c. 101,200,199,199 d. 200,300,200,100