11Nov_Monday_lab
11Nov_Monday_lab
Q1 Dothraki is planning an attack to usurp King Robert’s throne. King Robert learns
of this conspiracy from Raven and plans to lock the single door through which
the enemy can enter his kingdom. But to lock the door, he needs a key that is an
anagram of a palindrome. He starts to go through his box of strings, checking to
see if they can be rearranged into a palindrome. You are given a string, write a
function possiblePal(char str[ ]) which takes a string as an input and returns YES if
the string can be rearranged into a palindrome else NO. The string will contain
lowercase characters only. (Using dynamic memory allocation)
Example 1:
Input: aaabbbb
Output: YES
Explanation: The rearranged palindrome for the given string is bbaaabb
Example 2:
Input:
cdcdcdcdeeeef
Output:
YES
Explanation: The rearranged palindrome for the given string is ccddeefeeddcc
Vehicle Information:
License Number: ABC123
Model: Toyota Camry
Year: 2020
Owner (Individual): John Doe
----------------------------------
Q4 Given an array arr[] containing N distances of inch-feet system, such that each
element of the array represents a distance in the form of {inch, feet}. The task is to add all
the N inch-feet distances using structures.
Example
Student Database:
Roll No Name Marks
-------------------------------------------------------------
101 Alice 89.50