Answer:
If all the character pairs match after processing both strings, one string in stack and the other in queue, then this means one string is the reverse of the other.
Explanation:
Lets take an example of two strings abc and cba which are reverse of each other.
string1 = abc
string2 = cba
Now push the characters of string1 in stack. Stack is a LIFO (last in first out) data structure which means the character pushed in the last in stack is popped first.
Push abc each character on a stack in the following order.
c
b
a
Now add each character of string2 in queue. Queue is a FIFO (first in first out) data structure which means the character inserted first is removed first.
Insert cba each character on a stack in the following order.
a b c
First c is added to queue then b and then a.
Now lets pop one character from the stack and remove one character from queue and compare each pair of characters of both the strings to each other.
First from stack c is popped as per LIFO and c is removed from queue as per FIFO. Then these two characters are compared. They both match
c=c. Next b is popped from stack and b is removed from queue and these characters match too. At the end a is popped from the stack and a is removed from queue and they both are compared. They too match which shows that string1 and string2 which are reverse of each other are matched.
Answer: Both have a center for knowledge; motherboard and brain. Both have a way of translating messages to an action. Both have a way of creating and sending messages to different parts of the system.
Answer:
Disadvantage of having too many features in a language is that:
- There are many functions with same name but perform different function or task so it will create an issue or problem.
- Features do not duplicate one another as, there are different possible syntax for the same meaning.
- In a mathematical function, sometimes user function and mathematical variable name collide with language base features so it will create problem.
Answer:
Registry
Explanation:
Windows Registry is used to store the configuration and setting information for hardware and software program which is critical for Windows operation. The registries are structured in hierarchical database model.
Basically, hierarchical database model is akin to a tree format which consist of the parent nodes and their child nodes. For example, a node named as HKEY_LOCAL_MACHINE can possess child nodes HARDWARE, SOFTWARE AND SYSTEM.
The node in the tree is also termed as a key.