answersLogoWhite

0

Use toupper from ctype.h for every letter. Obviously, it doesn't matter if the string is palindrom or not.

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Engineering

What method returns the uppercase equivalent of a string?

The toUpperCase() method returns the uppercase equivalent of a string.


Java program to convert lowercase to uppercase?

You can use the toUpperCase() method on a String to convert any String to all uppercase.


How do you identify the character in a string is uppercase?

In order to find whether a character in a string is in uppercase or not, you need to use the ascii\unicode values of the character. You may want to use the following code-- String str="Your Sample String Here"; //(say you have this string) int l=str.length(); for(int i=0;i<l;i++) { char ch=str.charAt(i); if(ch>=65&&ch<=90) //Since the values of block letters in ASCII are from 65 to 90 System.out.println(ch); } //This program basically prints out the block letters, but you can modify it as you like, by changing the statement after 'if' as you want


Program to check that given string is palindrome or not in C?

/*To check whether a string is palindrome*/includeincludevoid main () { int i,j,f=0; char a[10]; clrscr (); gets(a); for (i=0;a[i]!='\0';i++) { } i--; for (j=0;a[j]!='\0';j++,i--) { if (a[i]!=a[j]) f=1; } if (f==0) printf("string is palindrome"); else printf("string is not palindrome"); getch (); }


Changing a word to all uppercase letters in c plus plus?

To change any string to uppercase, loop through each character in the string. If the character is in the range 'a' through 'z', decrement the character by decimal 32 (the difference between ASCII value 'a' and 'A'). The following function shows an example of this: void to_upper(std::string& str) { for(int i=0; i<str.size(); ++i) if(str[i]>='a' && str[i]<='z') str[i]-=32; }

Related Questions

I am looking for a font that has all the uppercase letters uppercase and forward and all the lowercase letters lowercase and backward extra info I am trying to make a 2 word palindrome thst spins?

I don't believe there is such a font available. The easier way - would be to create the palindrome using Microsoft Paint. You can manipulate the letters as you see fit.


Why is it a bad idea to name your class string?

If you are talking about Java, that will cause confusion with the built-in "String" class. Sure, Java will distinguish "String" (with an uppercase "S") from "string" (which has no uppercase letters), but it can be confusing for the programmer. In various other programming languages, the situation may be similar.


What is the difference between uppercase and lowercase?

Uppercase---UPPERCASE TYPE LETTERS---Capital letters Lowercase---lowercase type letters----small letters


What method returns the uppercase equivalent of a string?

The toUpperCase() method returns the uppercase equivalent of a string.


What are uppercase and lowercase letters?

THESE LETTERS ARE IN UPPERCASE. these letters are in lowercase. These Letters Are in Upper and Lower Case.


How do you determine if a given string is palindrome or not?

Reverse the string and compare it to the original. If they match, then it is a palindrome.


Java program to convert lowercase to uppercase?

You can use the toUpperCase() method on a String to convert any String to all uppercase.


Which letter have vertical line of symmetry?

A, H, I, and a few others more. Note that those are uppercase letters. Since "symmetry" is related to the exact form of the letters, the situation with uppercase letters is different than with lowercase letters.A, H, I, and a few others more. Note that those are uppercase letters. Since "symmetry" is related to the exact form of the letters, the situation with uppercase letters is different than with lowercase letters.A, H, I, and a few others more. Note that those are uppercase letters. Since "symmetry" is related to the exact form of the letters, the situation with uppercase letters is different than with lowercase letters.A, H, I, and a few others more. Note that those are uppercase letters. Since "symmetry" is related to the exact form of the letters, the situation with uppercase letters is different than with lowercase letters.


What are examples of a palindrome program forward and backwards?

To check if a string is a palindrome, point to each end of the string and work inwards towards the middle. If the characters pointed at differ, the string is not a palindrome. When the pointers meet or cross each other, the string is a palindrome. Note that the string cannot contain whitespace or punctuation and comparisons must not be case-sensitive.


Is there a way to use regex to determine if a given string is a palindrome?

Yes, you can use regex to determine if a given string is a palindrome by reversing the string and then comparing it to the original string using regex.


What is a string palindrome?

A string palindrome is some words that put together form a sentence. An example is "A man, a plan, a canal - Panama".


What is string palindrome?

A string palindrome is some words that put together form a sentence. An example is "A man, a plan, a canal - Panama".