Computers and Technology

Given a string, convert the characters of the string into opposite case, i.e. if a character is lower case than convert it into upper case and vice versa.
Examples:

Input : geeksForgEeks
Output : GEEKSfORGeEKS

Input : hello every one
Output : HELLO EVERY ONE
Recommended: Please try your approach on {IDE} first, before moving on to the solution.
ASCII values of alphabets: A – Z = 65 to 90, a – z = 97 to 122
Steps:

Take one string of any length and calculate its length.
Scan string character by character and keep checking the index .
If character in a index is in lower case, then subtract 32 to convert it in upper case, else add 32 to convert it in upper case
Print the final string.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 12:20, crodriguez87
Usually, when we sniff packets, we are only interested certain types of packets. we can do that by setting filters in sniffing. scapy’s filter use the bpf (berkeley packet filter) syntax; you can find the bpf manual from the internet. set the following filters and demonstrate your sniffer program again (each filter should be set separately): (a) capture only the icmp packet. (b) capture any tcp packet that comes from a particular ip and with a destination port number 23. (c) capture packets comes from or to go to a particular subnet. you can pick any subnet, such as 128.230.0.0/16; you should not pick the subnet that your vm is attached to.
Answers: 3
image
Computers and Technology, 23.06.2019 14:30, kodak0531
Which of the following would not be considered a pc? a. mainframe b. desktop c. tablet pc d. laptop
Answers: 2
image
Computers and Technology, 24.06.2019 09:00, lisacarter0804
Why might you chose to crest a function resume
Answers: 1
image
Computers and Technology, 24.06.2019 09:30, nialphonsa
Atype of researcher who uses computers to make sense of complex digital data
Answers: 1
Do you know the correct answer?
Given a string, convert the characters of the string into opposite case, i.e. if a character is lowe...

Questions in other subjects:

Konu
Mathematics, 10.09.2020 14:01
Konu
Mathematics, 10.09.2020 14:01
Konu
Mathematics, 10.09.2020 14:01
Konu
Social Studies, 10.09.2020 14:01
Konu
Mathematics, 10.09.2020 14:01
Konu
Mathematics, 10.09.2020 14:01
Konu
Mathematics, 10.09.2020 14:01
Konu
Mathematics, 10.09.2020 14:01
Konu
Chemistry, 10.09.2020 14:01
Konu
Mathematics, 10.09.2020 14:01