write a program in reverse the string without using
pointer,array,global variable declaration,lib fun only using
a function?
Answer Posted / 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 |
Post New Answer View All Answers
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
what is the differnce between programing langauge and tool? is sas is a programing langauge r tool?
What is the meaning of && in c?
What is getch?
typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none
What is 1f in c?
What are the types of data files?
What is the difference between formatted&unformatted i/o functions?
What should malloc() do? Return a null pointer or a pointer to 0 bytes?
How can variables be characterized?
How can I invoke another program or command and trap its output?
if p is a string contained in a string?
When should volatile modifier be used?
What is the c value paradox and how is it explained?
Explain the difference between malloc() and calloc() in c?