Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.
Login
Login
OnlineGDB Q&A
Questions
Unanswered
Tags
Ask a Question
Ask a Question
why cant i use strrev if i can't what other way is there to reverse a function
0
votes
asked
May 14, 2020
by
1NAVEENKJOSEPH
(
120
points)
Your answer
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
1 Answer
0
votes
answered
May 15, 2020
by
garla sai roshan
(
140
points)
/*
reversing a string without using built in fn
*/
#include <stdio.h>
int main()
{
char a[10],b[10];
int i,j;
printf("enter a string");
gets(a);
for(i=0;a[i]!='\0';i++)
{
}
i--;
for(j=0;i>=0;i--,j++)
{
b[j]=a[i];
}
b[j]='\0';
puts(b);
return 0;
}
commented
Jul 16, 2021
by
[20EE032] Pranav Kumar Singh
(
100
points)
please can you try using strrev function as when i am using it shows error every time while my code is correct also
commented
Jan 1, 2023
by
1D-king
(
100
points)
Same here.
DID you find solution?
Your comment on this answer:
Your name to display (optional):
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please
log in
or register.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...