Answer:
Short, technical, include a call to action.
Relevant, short, entertaining.
Short, entertaining, include a call to action.
Explanation:
Answer:
Explanation:
import java.util.Scanner;
public class PalindromeCheck
{
public static void palindromeCheck()
{
String someWord=" ";
int count=0;
int total=0;
System.out.println("Ënter some words entered by whitespace");
Scanner keyboard =new Scanner(System.in);
String[] words=keyboard.nextLine().split(" ");
for(int i=0;i<words.length;i++)
{
boolean flag=true;
int l=words[i].length();
for(int j=0;j<=l/2;j++)
{
if(words[i].charAt(j)!=words[i].charAt(l-j-1))
{
flag=false;
break;
}
}
if(flag)
count++;
}
System.out.println("There are "+count+" palindromes out of "+words.length+" words");
keyboard.close();
}
public static void main(String[] args)
{
palindromeCheck();
}
}
Output
Ënter some words entered by whitespace
This is a malayalam.
There are 3 palindromes out of 4 words
Answer:
false
Explanation:
string literal cannot be be assigned to a fixed length char array. however, it can be assigned using a char* e.g:
char* word =(char*) "CCA\0";
Answer:
Its C that is the answer hahahahha