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:
The answer is D because u have the uppercase letter bold
Answer:
There are different kinds of operating systems: such as Windows, Linux and Mac OS
There are also different versions of these operating systems, e.g. Windows 7, 8 and 10
Operating systems can be used with different user interfaces (UI): text user interfaces (TUI) and graphical user interfaces (GUI) as examples
Graphical user interfaces have many similarities in different operating systems: such as the start menu, desktop etc.
When you can recognize the typical parts of each operating system’s user interface, you will mostly be able to use both Windows and Linux as well as e.g. Mac OS.
THE ROLE OF OPERATING SYSTEM IN THE COMPUTER
An operating system (OS) is a set of programs which ensures the interoperability of the hardware and software in your computer. The operating system enables, among other things,
the identification and activation of devices connected to the computer,
the installation and use of programs, and
the handling of files.
Answer:
Option b It executes a new process, which runs at the same time as the parent
Explanation:
The exec is one of the Java Runtime methods which is used to create a new process and run it as an separate process. Exec method executes the string command that we place inside the bracket. For example,
Process proc = Runtime.getRuntime().exec("Notepad.exe");
The statement above offers a convenient way to open the another computer software such as Notepad when running the program.
Answer:
0.127 miles ; 5.458 *10^8 miles
Explanation:
Number of bytes needed to store a page = 2000
Number of pages (Harry Potter's book) = 800
Total memory required to store entire book = (2000 * 800) = 1600000 = 16 * 10^5 bytes
Hence,
1 byte of memory will store : (height of each book / memory size of each book)
= 3 ÷ 16 * 10^5
= 1.875 * 10^-6
For 32 bit memory space :
(1.875 * 10^-6 * 2^32) = 8053.06368 inches
1 inch = 1.578 * 10^-5 mile
8053.06368 inches = 8053.06368 * (1.578 * 10^-5) = 0.1270773448704 miles
= 0.127 miles
For 64 bit memory size :
(1.875 * 10^-6 * (2^64)) = 3.45876 * 10^13 inches
(3.45876 * 10^13) * (1.578 * 10^-5)
= 5.458 *10^8 miles