answersLogoWhite

0

To convert to uppercase, subtract 32 from all characters in the range 'a' to 'z'. To convert to lower-case, add 32 to all characters in the range 'A' to 'Z'. Note that each character is mapped to a value in the ASCII character table and the difference between character 'A' (#65) and character 'a' (#97) is 32.

Using binary notation, characters in the range 65 to 91 ('A' to 'Z') have most significant bits 010 while characters in the range 92 to 122 ('a' to 'z') have most significant bits 011. Therefore switching bit 5 automatically flips a character between uppercase and lower-case, providing the character is an alphabetic character to begin with.

User Avatar

Wiki User

11y ago

What else can I help you with?

Continue Learning about Engineering

Write a program to initialize a character and print whether it is uppercase lowercase or special character in java module 1?

I'll just write a function to do that, I hope the good people won't try to run it as it is.... void function() { char c = 'a'; if( c >= 'a' && c <='z' ) System.out.println("LowerCase"); else if( c>='A' && c <='Z' ) System.out.println("UpperCase"); else System.out.println("Special Character"); }


Write a function that will scan a character string passed as an argument and convert all lowercase letters onto uppercase letters?

/* Write a function that will scan a character string passed as an argument & convert all lowercase characters into their uppercase characters*/ #include<stdio.h> #include<conio.h> #include<string.h> #include<ctype.h> int str_upp(char c[]) { int i; char x; printf("\n \n"); for(i=0;i<strlen(c);i++) { x=toupper(c[i]); printf("%c",x); } return (0); } void main() { char c[10]; clrscr(); printf("Enter string : \n"); scanf("%s",c); str_upp(c) ; getch(); } /* Output: Enter string : Heloo HELOO */


In C language lowercase letters are significant?

Yes.


Most c plus plus programmers use uppercase letters for variable names true or false?

False. Most C++ programmers use uppercase for macros (precompiler definitions), making them less likely to be confused with actual variables, constants or functions in the C++ source code. Macros are not actually part of the C++ language because the compiler never sees them, but they allow the precompiler to perform preprocessing tasks that would be difficult or impossible to accomplish with C++ code alone.


Are upper and lower case equivalent to C?

It is false. C is a case-sensitive language, so VALUE, Value and value are all treated as being different identifiers. By convention, all C standard library names are in lowercase and macro names are in uppercase. User-defined names typically begin with a leading capital.

Related Questions

How do you convert uppercase to lowercase and vice versa in c?

with toupper and tolower, from ctype.h


What is mean by upper and lowercase letters for password?

Passwords often require a combination of uppercase and lowercase letters for security. Uppercase letters are those in the capital form (e.g., A, B, C), while lowercase letters are in the small form (e.g., a, b, c). Using a mix of both increases the complexity of the password and makes it more difficult for hackers to guess.


Write a program to initialize a character and print whether it is uppercase lowercase or special character in java module 1?

I'll just write a function to do that, I hope the good people won't try to run it as it is.... void function() { char c = 'a'; if( c >= 'a' && c <='z' ) System.out.println("LowerCase"); else if( c>='A' && c <='Z' ) System.out.println("UpperCase"); else System.out.println("Special Character"); }


Most c plus plus plus programmers use uppercase letters for variable names?

No.


Is uppercase ever used in a C program?

Yes. By convention, macros use all uppercase while all user-defined names should have a leading capital to differentiate them from standard library names which are all lowercase.


How many calories in 390 kcal?

"calories" (lowercase C) and "kilocalories" or "kcal" are interchangeable words. 1 Calorie (uppercase C) = 1000 calories (lowercase C) = 1 kilocalorie So, 390 kcal is equal to 390 calories as well.


What is the uppercase character?

A is an uppercase character... Unless you mean to look for an "uppercase 1." In that case, there is no actual uppercase 1 or lowercase 1. 1 is just 1. If you want to switch it up though, you could use "I" (the Roman Numeral for 1) or its lowercase equivalent "i."


How do you make a backwards c?

Depending if you want to make a capital or lowercase c, copy/paste these characters. Lowercase: כ Uppercase: Ɔ note: using כ could cause issues from the text flipping around in a search bar.


A cT air mass is?

A cT air mass refers to a type of air mass classification. The lowercase "c" stands for continental, or dry, while the uppercase "T" stands for tropical.


What is the difference between a calorie and a Calorie?

A calorie (lowercase c) is a unit of energy measurement, while a Calorie (uppercase C) is a kilocalorie, which is equal to 1000 calories. In nutrition, Calorie is commonly used to represent the energy content of food.


What is L in new times roman metric units?

L stands for litre. Technically speaking it should be a lowercase l. Symbols for units named after people should be uppercase, those not named after people should be lowercase. Newton, watt, coulomb, are N, W, C. Metre, litre, second, are m, l, s. Litre is often denoted with an uppercase L to avoid confusion with the number 1.


What is upper case and lower case and 'no' in a password?

Uppercase is capital letters. For example: A B C D E F G Lowercase is letters that are not capitalised. For example: a b c d e f g "No" is probably the abbreviation for "number".