You are changing the word
Answer:
return instruction used to return a value from a function.
Explanation:
Function is a block of statement which perform the special task.
Syntax for define a function:
type name(parameter_1, parameter_2,...)
{
statement;
return variable;
}
In the syntax, type define the return type of the function. It can be int, float, double and also array as well. Function can return the array as well.
return is the instruction which is used to return the value or can use as a termination of function.
For return the value, we can use variable name which store the value or use direct value.
Answer:
#include <bits/stdc++.h>
using namespace std;
bool isPalindrome(string str)
{
char a,b;
int length = str.length();
for (int i = 0; i < length / 2; i++)
{
a=tolower(str[i]);//Converting both first characters to lowercase..
b=tolower(str[length-1-i]);
if (b != a )
return false;
}
return true;
}
int main() {
string t1;
cin>>t1;
if(isPalindrome(t1))
cout<<"The string is Palindrome"<<endl;
else
cout<<"The string is not Palindrome"<<endl;
return 0;
}
Output:-
Enter the string
madam
The string is Palindrome
Enter the string
abba
The string is Palindrome
Enter the string
22
The string is Palindrome
Enter the string
67876
The string is Palindrome
Enter the string
444244
The string is not Palindrome
Explanation:
To ignore the cases of uppercase and lower case i have converted every character to lowercase then checking each character.You can convert to uppercase also that will also work.
"add-in" is pretty ambigious but I would go with true for this one.
Answer:
True
Explanation:
C language is developed with the help of UNIX in 1972. It was developed by Denis Ritchie at Bell labs. many languages are developed with the help of C Platform. Such as C++, C sharp and Java.