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
What are the features of the c language?
What is string in c language?
Write a C program linear.c that creates a sequence of
processes with a given length. By
sequence it is meant that each created process has exactly
one child.
Let's look at some example outputs for the program.
Here the entire process sequence consists of process 18181:
Sara@dell:~/OSSS$ ./linear 1
Creating process sequence of length 1.
18181 begins the sequence.
An example for a sequence of length three:
Sara@dell:~/OSSS$ ./linear 3
Creating process sequence of length 3.
18233 begins the sequence.
18234 is child of 18233
18235 is child of 18234
........ this is coad .... BUt i could not compleate it .....:(
#include
How can I get random integers in a certain range?
Whats s or c mean?
Write a program on swapping (100, 50)
What is the best style for code layout in c?
Why do we use namespace feature?
Can you pass an entire structure to functions?
What is extern variable in c with example?
Is it valid to address one element beyond the end of an array?
Using which language Test cases are added in .ptu file of RTRT unit testing???
What is sizeof c?
What are the parts of c program?
c language interview questions & answer