- 0
Notifications Mark All Read
- Login
- Get Prime
Wipro NTH Coding Question- 27
Access Denied!
To view this page you have to login first
Login here -
Trivia
Did you know 1 million people use PrepInsta everyday?
Notifications Mark All Read
To view this page you have to login first
Login here -
Did you know 1 million people use PrepInsta everyday?
#include
#include
int main()
{
char mystring[50];
int len, i;
//print a string about the program
printf(“C Program to reverse a string\n”);
printf(“Enter a string: “);
//get the input string from the user
scanf(“%s”, mystring);
//find the length of the string using strlen()
len = strlen(mystring);
//loop through the string and print it backwards
for(i=len-1; i>=0; i–){
printf(“%c”, mystring[i]);
}
return 0;
}