Saturday Questions ---- 03-Dec-2022

Saturday Questions

Questions on Strings

Varanasi Software Junction: Saturday Questions.


  1. Check if 2 words are anagrams or not?
    Eg worth and throw are anagrams.
  2. Validate a given IP address. Eg 123.221.107.99 is a valid IP address
  3. Reverse words in a sentence.
    Eg this is a train becomes train a is this
  4. Find palindromes in  a sentence.
    Eg Madam is a Malayalam speaker.
    Madam, a, and Malayalam
  5. Check for a Panagram. A panagram is a sentence that contains every letter in the alphabet.
    Eg A quick brown fox jumps over the lazy dog.
  6. Implement ATOI, a program that converts an array of characters into an integer.
    Eg [1,2,3]=123.
  7. Find longest prefix. 
    Eg And, Andaman, Andorra. Longest prefix is and.
  8. Convert to proper case. Eg mAhenDer SIngH Dhoni becomes
    Mahender Singh Dhoni
  9. Convert  a name to initials.
    Mahender Singh Dhoni=MS Dhoni. Mahender Dhoni = M Dhoni.
  10. Find longest suffix. 
    Eg best, nicest, surest = est

Post your answers in the discussion boxes below.

Contact us for software training, education or development










 

Post a Comment

0 Comments