Answer:
Here is the JavaScript program:
function Palindrome(word) {
return word == word.toLowerCase().split("").reverse().join("") ? true : false; }
inputWord = prompt("Enter a word to check its if its palindrome or not?");
alert(Palindrome(inputWord));
Explanation:
The function Palindrome takes a word as argument.
return word == word.toLowerCase().split("").reverse().join("") ? true : false; }
This statement first converts the word, which is a string to lower case letters using toLowerCase() method. Next split() method splits the word string into an array of strings, then reverse() method reverses the this array and join() method joins all the elements of the array back to the string. At last the conditional statement checks if the resultant string (reverse of word) is equal to the original word (that was input by user). If both the word and its reverse are equal/same then the program outputs true otherwise returns false.
inputWord = prompt("Enter a word to check its if its palindrome or not?"); statement uses prompt command to take input from the user. inputWord holds the word that user enters.
alert(Palindrome(inputWord)); statement calls Palindrome() method by passing the inputWord (word entered by user) to check if the input word is a palindrome or not. alert() method displays an alert box ( a message) with true if the inputWord is a palindrome otherwise it displays false.
If my memory serves me well, the answer should be: In a hard wrap, information about where the text begins a new line is included with the data field value. Usually text-editors use hard wrap by default. This means, that hard wrap inserts actual line breaks in the text at wrap points.
Because while you might be able to recruit a person new to the job market and underpay them, you won't be able to keep a competitor from hiring them away from you by offering higher wages and benefits. If you are not fair in what you are paying people won't want to work for you.
Answer:
#include <stdio.h>
#include <stdlib.h>
int main()
{
int *iVar;
char *cVar;
float *fVar;
/*allocating memory dynamically*/
iVar=(int*)malloc(1*sizeof(int));
cVar=(char*)malloc(1*sizeof(char));
fVar=(float*)malloc(1*sizeof(float));
printf("Enter integer value: ");
scanf("%d",iVar);
printf("Enter character value: ");
scanf(" %c",cVar);
printf("Enter float value: ");
scanf("%f",fVar);
printf("Inputted value are: %d, %c, %.2f\n",*iVar,*cVar,*fVar);
/*free allocated memory*/
free(iVar);
free(cVar);
free(fVar);
return 0;
}