Write a program to replace n bits from the position p of the bit representation of an inputted character x with the one's complement. Method invertBit takes 3 parameters x as input character, p as position and n as the number of positions from p. Replace n bits from pth position in 8 bit character x. Then return the characters by inverting the bits.
4155In cryptography, you could often break the algorithm if you know what was the original (plain) text that was encoded into the current ciphertext. This is called the plain text attack. In this simple problem, we illustrate the plain text attack on a simple substitution cipher encryption, where you know each letter has been substituted with a different letter from the alphabet but you don’t know what that letter is. You are given the cipherText as the input string to the function getwordSets(). You know that a plain text "AMMUNITION" occurs somewhere in this cipher text. Now, you have to find out which sets of characters corresponds to the encrypted form of the "AMMUNITION". You can assume that the encryption follows simple substitution only. [Hint: You could use the pattern in the "AMMUNITION" like MM occurring twice together to identify this]
2418At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E .. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with these names could be kept in that shelf as in this example: bottom of shelf ---> [AAAJKRDFDEWAAYFYYKK]-----Top of shelf. All these packets are to be loaded on cars. The cars are lined in order, so that the packet could be loaded on them. The cars are also named [A, B, C, D, E, .]. Each Car will load the packet with the same alphabet. So, for example, car A will load all the packets with name A. Each particular car will come at the loading point only once. The cars will come at the loading point in alphabetical order. So, car B will come and take all the packets with name B from the shelf, then car C will come. No matter how deep in the shelf any packet B is, all of the B packets will be displaced before the C car arrives. For that purpose, some additional shelves are provided. The packets which are after the packet B, are kept in those shelves. Any one of these shelves contains only packets, having the same name. For example, if any particular shelf is used and if a packet with name X is in it, then only the packets having names X will be kept in it. That shelf will look like [XXXXXXX]. If any shelf is used once, then it could be used again only if it is vacant. Packets from the initial shelf could be unloaded from top only. Write a program that finds the minimum total number of shelves, including the initial one required for this loading process.
2205which of the following is non incremental testing??? a)big bang b)top down c)bottom up d)agile
4 9043Post New Infosys Interview Questions
How do you inspect a selection option?
Explain how you can improve the throughput of a remote consumer?
What are the different windows events activated at runtime ?
On Test Complete I recorded some keyword test. while I'm running the batch test, if one test case failed, then how test complete skip the failed test case and again continue to run the test case? please provide some way to resolve this issue.
What is 'mps' (master production scheduling)?
What does a server do?
How fuel oil consumed by medium engine?
how to creat 2 test plan in 2 different environment exp:tour and travel
How many types of jdbc drivers are available?
Why fact table is in normal form?
Multiply all elements of a list without writing a loop?
what is functionality of polymer? how can we get theoretical and practically?
How to get Table data subset through IProvider ?
How to get the OR SAP discriptive program by using RFT.
Explain the use of duration attribute of @outputcache page directive.