How to convert lowercase letters to uppercase and uppercase letters to lowercase in a string. (ex, AbcdEfG should convert as aBCDeFg)
Answer Posted / agrawal_vivek
easiest way is to use the condition-
for(i=0;s[i]!='';i++)
{
if(s[i]>=65 && s[i]<=90) //Caps ASCII-65-90(60+32=97-----90+32=122)
s[i]=s[i]+32;
if(s[i]>=97 && s[i]<=122) // Small ASCII-97-122(97-32=65-----122-32=90)
s[i]=s[i]-32;
}
Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is implicit cursor in pl sql?
What is the syntax and use of the coalesce function?
What is the example of procedure?
Why is nosql good?
How to execute a stored procedure?
how to enter characters as hex numbers? : Sql dba
Why stored procedure is faster than query?
What is the difference between alter trigger and drop trigger statements?
Can I learn sql in a week?
How sql query is executed?
How do you change a value in sql?
What is sqlcontext?
Can we enter data in a table in design view?
what is denormalization. : Sql dba
What is pl sql in oracle?