Answer:
Program is in C++
Explanation:
C++ Code:
#include <iostream>
#include <cctype>
using namespace std;
int main(){
char ch;
do{
cout<<"Enter Character: ";
cin>>ch;
if (isupper(ch)){
cout<<"OK"<<"\n";
}
}
while(ch!='!');
return 0;
}
_______________________________________
Code Explanation
First execute a do while loop as we want user to enter at least first character to check whether its upper case or not. If user enters exclamation character then this loop will terminate along with the program.
To check whether the entered character is upper case or not we will be using isupper(ch) method defined in cctype library.
If the character is upper case then if condition will show Ok by printing it using cout and this program will show nothing if the character is not upper case.
Sample Output
Enter Character: A
OK
Enter Character: b
Enter Character: c
Enter Character: d
Enter Character: E
OK
Enter Character: G
OK
Enter Character: F
OK
Enter Character: !
Join ... using keywords should be used to specify how the tables should be linked.
2. join ... using
<u>Explanation:</u>
If table is has to be linked it can be connected normally as outer join with same column name.
Purpose of outer join is to fetch the matched records among the table and get the relevant records from table.
People can also use select statement with “IN” sub query, if we use “IN” query execute very slow during the fetching the matched records.
As good practice join using is used in same column name is available across the table.
By using join using in query end user can set some query conditions also.
B,D,E are the answers for your question :)
Answer:
a) # include <iostream>
# include <conio.h>
# include <stdio.h>
# include <string.h>
using namespace::std;
bool IsPalindrome(const string& str)
{
if (str.empty())
return false;
int i = 0; // first characters
int j = str.length() - 1; // last character
while (i < j)
{
if (str[i] != str[j])
{
return false;
}
i++;
j--;
}
return true;
}
int main()
{
string str;
cout<<"Enter the string";
getline(cin, str);
bool a= IsPalindrome(str);
if(a)
{
cout<<"Is in palindrome";
}
else
{
cout<<"Is not in palindrome";
}
}
b) Modified version of function with full program to discard uppercase or lowercase is as below:
# include <iostream>
# include <conio.h>
# include <stdio.h>
# include <string.h>
using namespace::std;
bool IsPalindrome(const string& str)
{
if (str.empty())
return false;
int i = 0; // first characters
int j = str.length() - 1; // last character
while (i < j)
{
char a= tolower(str[i]);
char b= tolower(str[j]);
if (a != b)
{
return false;
}
i++;
j--;
}
return true;
}
int main()
{
string str;
cout<<"Enter the string";
getline(cin, str);
bool a= IsPalindrome(str);
if(a)
{
cout<<"Is in palindrome";
}
else
{
cout<<"Is not in palindrome";
}
}
Explanation:
Please check the answer section.
<span>the answer is FF:FF:FF:FF:FF:FF </span>