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?

Answers were Sorted based on User's Feedback



write a program in reverse the string without using pointer,array,global variable declaration,lib f..

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

write a program in reverse the string without using pointer,array,global variable declaration,lib f..

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

write a program in reverse the string without using pointer,array,global variable declaration,lib f..

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

write a program in reverse the string without using pointer,array,global variable declaration,lib f..

Answer / 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

write a program in reverse the string without using pointer,array,global variable declaration,lib f..

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

Post New Answer

More C Interview Questions

what is object oriental programing?

1 Answers  


Explain can the sizeof operator be used to tell the size of an array passed to a function?

0 Answers  


what are far pointers?

1 Answers  


Why pointers are used?

0 Answers  


What are global variables and how do you declare them?

0 Answers  


What does typeof return in c?

0 Answers  


code for concatination of 2 strings with out using library functions?

3 Answers  


How can you check to see whether a symbol is defined?

0 Answers  


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?

0 Answers   Case, IBM,


what value is returned to operating system after program execution?

0 Answers  


What is a far pointer?What is the utility?

4 Answers  


#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

1 Answers  


Categories