Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

201.

Vigenere cipher is an example of ______________(a) mono-alphabetic cipher(b) poly-alphabetic cipher(c) transposition cipher(d) additive cipherI have been asked this question in final exam.I need to ask this question from Cryptography topic in chapter Cryptography of Data Structures & Algorithms II

Answer»

The correct choice is (B) poly-alphabetic cipher

Easiest explanation - VIGENERE cipher is a substitution cipher. It falls under the category of poly alphabetic cipher as it USES MULTIPLE substitution at different positions in order to cipher the plain text.

202.

What is the meaning of cipher in cryptography?(a) an algorithm that performs encryption(b) an algorithm that generates a secret code(c) an algorithm that performs encryption or decryption(d) a secret codeThe question was asked in class test.The doubt is from Cryptography in section Cryptography of Data Structures & Algorithms II

Answer»

Right answer is (c) an algorithm that performs encryption or decryption

Easy explanation - Cipher is an algorithm for PERFORMING encryption or decryption. In CRYPTOGRAPHY, a set of defined STEPS are followed to generate ciphers. These are NECESSARY to prevent data BREACH.

203.

What is common between affine cipher and pigpen cipher.(a) both are mono alphabetic substitution cipher(b) both are poly alphabetic substitution cipher(c) both can be cracked using frequency analysis(d) both are transposition cipherThis question was addressed to me during an online exam.My doubt is from Cryptography in chapter Cryptography of Data Structures & Algorithms II

Answer»

The CORRECT option is (C)both can be cracked USING frequency analysis

Both affine CIPHER and pigpen cipher can be broken using frequency analysis. Pigpen cipher is an example of a geometric substitution cipher.

204.

What will be the plain text corresponding to ciphered text “|__|>” if pigpen cipher is used for encryption?(a) cat(b) hat(c) dog(d) ratThis question was addressed to me during an internship interview.I want to ask this question from Cryptography in division Cryptography of Data Structures & Algorithms II

Answer» CORRECT answer is (a) cat

For explanation: Pigpen CIPHER replaces letters of the plain text with corresponding SYMBOLS. So by using the grid we can REPLACE these symbols by their corresponding letters which are “cat” here.
205.

What will be the ciphered text corresponding to plain text “ACT” if pigpen cipher is used for encryption?(a) _| |_ >(b) |_ > |_(c) _| |_

Answer»

The CORRECT option is (a) _| |_ >

The explanation is: Pigpen CIPHER replaces LETTERS of the plain text with corresponding SYMBOLS. These symbols are FRAGMENT of a grid.

206.

Pigpen cipher is not susceptible to frequency analysis.(a) True(b) FalseThis question was addressed to me in an online quiz.The query is from Cryptography in division Cryptography of Data Structures & Algorithms II

Answer» RIGHT CHOICE is (b) False

Best explanation: Pigpen cipher is a very weak cipher as it just replaces LETTERS with CORRESPONDING SYMBOLS. It can be easily broken using frequency analysis.
207.

Pigpen cipher is less secure than a vigenere cipher.(a) True(b) FalseI had been asked this question by my college professor while I was bunking the class.Question is from Cryptography topic in chapter Cryptography of Data Structures & Algorithms II

Answer»

The CORRECT option is (a) True

The best explanation: Vigenere cipher is more secure as COMPARED to pigpen cipher. It is because pigpen cipher is GEOMETRIC substitution cipher and vigenere cipher is POLY alphabetic substitution cipher.

208.

Pigpen cipher is an example of?(a) Mono alphabetic substitution cipher(b) Transposition cipher(c) Poly alphabetic substitution cipher(d) Geometric substitution cipherThe question was asked by my school principal while I was bunking the class.Origin of the question is Cryptography topic in portion Cryptography of Data Structures & Algorithms II

Answer»

Correct choice is (a) MONO ALPHABETIC substitution CIPHER

For explanation: Pigpen cipher ENCRYPTS the plain text by replacing each letter with a corresponding symbol. Pigpen cipher is an example of geometric substitution cipher.

209.

Which of the following is not a poly alphabetic substitution cipher?(a) vigenere cipher(b) one time pad cipher(c) play fair cipher(d) pigpen cipherI had been asked this question in an online interview.I'm obligated to ask this question of Cryptography topic in chapter Cryptography of Data Structures & Algorithms II

Answer» RIGHT choice is (d) pigpen cipher

The best I can explain: Pigpen cipher is the only non poly alphabetic SUBSTITUTION cipher out of the GIVEN options. It is an EXAMPLE of GEOMETRIC substitution cipher.
210.

Choose the weakest cipher from the following?(a) vigenere cipher(b) rail fence cipher(c) hill cipher(d) pigpen cipherI got this question in unit test.This intriguing question comes from Cryptography topic in chapter Cryptography of Data Structures & Algorithms II

Answer»

Correct option is (d) pigpen cipher

To explain: Pigpen cipher is the weakest cipher out of the GIVEN options. This is because it is a simple GEOMETRIC substitution cipher so can be EASILY cracked using frequency ANALYSIS.

211.

Which of the following cipher was used by freemasons?(a) Vigenere cipher(b) Autokey cipher(c) Pigpen cipher(d) Hill cipherI have been asked this question in unit test.The origin of the question is Cryptography in division Cryptography of Data Structures & Algorithms II

Answer»

The correct answer is (C) Pigpen cipher

The best explanation: Pigpen cipher is BELIEVED to be USED by freemasons in the 18th century. Pigpen cipher is an example of GEOMETRIC substitution cipher.

212.

Which of the following is not an alternative name of pigpen cipher?(a) pen cipher(b) freemason’s cipher(c) napoleon cipher(d) tic-tac-toe cipherThe question was posed to me during an online exam.My query is from Cryptography in division Cryptography of Data Structures & Algorithms II

Answer» CORRECT choice is (a) pen CIPHER

The best explanation: Pigpen cipher is also known by the names like:- freemason’s cipher, NAPOLEON cipher, tic-tac-toe cipher, MASONIC cipher. It is a cipher which is believed to be used by freemasons in the 18TH century.
213.

Which of the following cipher replaces letters with symbols?(a) polybius square ciper(b) affine cipher(c) caesar cipher(d) pigpen cipherThis question was addressed to me in exam.My doubt stems from Cryptography in portion Cryptography of Data Structures & Algorithms II

Answer»

Right option is (d) pigpen cipher

The explanation is: Pigpen cipher encrypts the PLAIN text by replacing each LETTER with a corresponding SYMBOL. Pigpen cipher is an EXAMPLE of geometric substitution cipher.

214.

What will be the encrypted text corresponding to plain text “SANFOUNDRY” using columnar transposition cipher with the keyword as “GAMES”?(a) SNONRAFUDY(b) SORAFUDYNN(c) SNAUDNORFY(d) ANFRSUNDOYThe question was asked in examination.My question is from Cryptography in division Cryptography of Data Structures & Algorithms II

Answer»

Correct answer is (d) ANFRSUNDOY

The best explanation: For ENCRYPTING using columnar cipher we have to arrange the letters of the plain text in a table which has the same number of columns as the letters of the keyword. Then the letters of the keyword are arranged in ALPHABETICAL order and we read ALONG each column.

3 1 4 2 5

G A M E S

S A N F O

U N D R Y

So the ciphered text will be “ANFRSUNDOY”.

215.

What will be the encrypted text corresponding to plain text “SANFOUNDRY” using rail fence cipher with key value given to be 2?(a) SNONRAFUDY(b) SORAFUDYNN(c) SNAUDNORFY(d) SANFOUNDRYThe question was posed to me by my school teacher while I was bunking the class.This key question is from Cryptography in portion Cryptography of Data Structures & Algorithms II

Answer»

Correct CHOICE is (a) SNONRAFUDY

Easy explanation - For encrypting a plain text using rail FENCE CIPHER we use a table having a NUMBER of rows equal to key value as shown below. Then we read along the rows to get the CIPHERED text. So the ciphered text will be “SNONRAFUDY”.

216.

Combining transposition cipher with substitution cipher improves its strength?(a) true(b) falseI have been asked this question in an online quiz.I need to ask this question from Cryptography topic in portion Cryptography of Data Structures & Algorithms II

Answer» RIGHT answer is (a) true

For explanation: COMBINING transposition cipher with substitution cipher helps in overcoming its weaknesses. But it CAUSES the cipher to become more laborious to decode and it BECOMES more prone to errors.
217.

In which of the following cipher the plain text and the ciphered text have same set of letters?(a) one time pad cipher(b) columnar transposition cipher(c) playfair cipher(d) additive cipherI had been asked this question in my homework.Question is taken from Cryptography topic in section Cryptography of Data Structures & Algorithms II

Answer»

Right option is (b) COLUMNAR transposition cipher

For explanation: In transposition cipher, the letters remain same in ciphered and plain text. Their POSITION is only changed whereas in substitution cipher the letters become different in encrypted text. So columnar transposition cipher will be the CORRECT option.

218.

Which of the following is a type of transposition cipher?(a) Rail Fence cipher(b) Hill cipher(c) Rotor cipher(d) One time padI have been asked this question in an online quiz.My doubt stems from Cryptography in chapter Cryptography of Data Structures & Algorithms II

Answer» RIGHT option is (a) RAIL Fence cipher

Explanation: In transposition cipher the letters of the given message are shuffled in a PARTICULAR order, fixed by a given RULE. Two TYPES of transposition cipher are – Rail fence cipher and Columnar transposition cipher.
219.

Which of the following ciphered text would have used transposition cipher for encryption of the plain text “SANFOUNDRY”?(a) SSCMBNUMERY(b) TBMGPVOESZ(c) UCNHQWPFTA(d) SNONRAFUDYThis question was addressed to me during an interview.I'd like to ask this question from Cryptography topic in section Cryptography of Data Structures & Algorithms II

Answer» CORRECT option is (d) SNONRAFUDY

To EXPLAIN: We know that transposition CIPHER ENCRYPTS the plain text by SHUFFLING the letters of the plain text. So out of the given options, only “SNONRAFUDY” has the same set of letters as “SANFOUNDRY”.
220.

Route cipher falls under the category of?(a) mono-alphabetic cipher(b) poly-alphabetic cipher(c) transposition cipher(d) additive cipherI had been asked this question by my school principal while I was bunking the class.This intriguing question comes from Cryptography in portion Cryptography of Data Structures & Algorithms II

Answer»

The correct choice is (c) transposition CIPHER

Easiest EXPLANATION - Route cipher is a transposition cipher. It falls under the category of transposition cipher as it ENCRYPTS the PLAIN TEXT by rearranging its letters.

221.

Which of the following is not a type of mono alphabetic cipher?(a) additive cipher(b) multiplicative cipher(c) afffine cipher(d) hill cipherI got this question in a national level competition.My query is from Cryptography topic in section Cryptography of Data Structures & Algorithms II

Answer»

The CORRECT option is (d) hill CIPHER

The best explanation: In mono alphabetic cipher each symbol of plain text is replaced by a particular respective symbol in the cipher text. There are THREE types of mono alphabetic CIPHERS- additive, MULTIPLICATIVE and affine.

222.

Which of the following is not a type of transposition cipher?(a) Rail fence cipher(b) Columnar transposition cipher(c) One time pad cipher(d) Route cipherI got this question during an internship interview.I'd like to ask this question from Cryptography in chapter Cryptography of Data Structures & Algorithms II

Answer»

Correct choice is (c) One TIME pad cipher

Best explanation: Out of the given options only One time pad cipher is not a TYPE of TRANSPOSITION cipher. It is a type of SUBSTITUTION cipher.

223.

Which of the following cipher is created by shuffling the letters of a word?(a) substitution cipher(b) transposition cipher(c) mono alphabetic cipher(d) poly alphabetic cipherThe question was posed to me by my college director while I was bunking the class.My query is from Cryptography topic in portion Cryptography of Data Structures & Algorithms II

Answer»

Right CHOICE is (b) transposition cipher

The best explanation: TYPES of traditional ciphers- Transposition and SUBSTITUTION cipher. In transposition cipher the letters of the GIVEN message are shuffled in a particular order, fixed by a given rule.

224.

What is the meaning of cipher in computer terminology?(a) an algorithm that performs encryption(b) an algorithm that generates a secret code(c) an algorithm that performs encryption or decryption(d) a secret codeI got this question by my college director while I was bunking the class.This interesting question is from Cryptography in division Cryptography of Data Structures & Algorithms II

Answer»

Right CHOICE is (c) an algorithm that PERFORMS encryption or DECRYPTION

Explanation: Cipher can be defined to be an algorithm that performs encryption or decryption. In cryptography, a SET of defined steps are followed to generate CIPHERS.

225.

What will be the ciphered text if the string “HELLO” is given as input to the code of hill cipher with keyword as “SANFOUNDRY”?(a) EZJ(b) JEZ(c) ZEJ(d) JZEThis question was posed to me during a job interview.This intriguing question comes from Cryptography topic in division Cryptography of Data Structures & Algorithms II

Answer»

Correct choice is (d) JZE

To explain: Hill cipher is a type of poly ALPHABETIC substitution. It uses a n x n MATRIX in ORDER to cipher the given plain text. USING this method we find the ciphered text to be JZE.

226.

What will be the ciphered text if the string “SANFOUNDRY” is given as input to the code of vigenere cipher with keyword as “HELLO”?(a) UEWIIDKLL(b) ZEYQCOCM(c) ZEYQCBROCM(d) ZEYQCBROCMJDHThis question was addressed to me in unit test.This interesting question is from Cryptography in section Cryptography of Data Structures & Algorithms II

Answer»

Correct choice is (c) ZEYQCBROCM

Explanation: Vigenere cipher is a type of poly ALPHABETIC substitution which uses vigenere table for making substitutions in the plain text. USING the table we FIND the solution to be ZEYQCBROCM.

227.

In which of the following cipher the plain text and the ciphered text does not have same number of letters?(a) affine cipher(b) hill cipher(c) columnar cipher(d) additive cipherI had been asked this question by my college director while I was bunking the class.The question is from Cryptography topic in section Cryptography of Data Structures & Algorithms II

Answer»

The CORRECT CHOICE is (b) hill cipher

The BEST I can explain: In transposition cipher and mono alphabetic cipher the number of LETTERS remains the same in ciphered and deciphered text. But in poly alphabetic cipher the number of letters are different. So here as hill cipher is the only poly alphabetic cipher so it will be the ANSWER.

228.

Poly alphabetic cipher harder to decipher than mono alphabetic cipher.(a) true(b) falseThe question was asked during an interview.The query is from Cryptography topic in section Cryptography of Data Structures & Algorithms II

Answer»

Correct option is (a) true

Explanation: Mono alphabetic ciphers can be decoded by using the method FREQUENCY analysis. But in poly alphabetic cipher each symbol of PLAIN TEXT is replaced by a DIFFERENT cipher text regardless of its OCCURRENCE. This makes it very difficult to be decoded by using frequency analysis.

229.

Which of the following is a type of traditional cipher?(a) transportation cipher(b) transposition cipher(c) transforming cipher(d) translating cipherI have been asked this question in an online quiz.The doubt is from Cryptography topic in chapter Cryptography of Data Structures & Algorithms II

Answer»

The CORRECT choice is (b) TRANSPOSITION cipher

The BEST explanation: There are TWO types of a TRADITIONAL cipher. First is transposition cipher and the second is substitution cipher.

230.

Which of the following is not a type of poly alphabetic cipher?(a) Rotor cipher(b) Hill cipher(c) One time pad cipher(d) Affine cipherI had been asked this question in unit test.This question is from Cryptography topic in chapter Cryptography of Data Structures & Algorithms II

Answer»

Right ANSWER is (d) Affine cipher

Easiest explanation - In poly alphabetic cipher each SYMBOL of plain text is replaced by a DIFFERENT cipher text regardless of its occurrence. Out of the GIVEN options, only affine cipher is not a poly alphabetic cipher.

231.

Which of the following correctly defines poly alphabetic cipher?(a) a substitution based cipher which uses multiple substitution at different positions(b) a substitution based cipher which uses fixed substitution over entire message(c) a transposition based cipher which uses multiple substitution at different positions(d) a transposition based cipher which uses fixed substitution over entire messageThe question was posed to me in quiz.Query is from Cryptography topic in chapter Cryptography of Data Structures & Algorithms II

Answer»

Right option is (a) a substitution based cipher which uses multiple substitution at DIFFERENT POSITIONS

The best I can EXPLAIN: POLY alphabetic cipher is a type of substitution cipher. It uses multiple substitution at different positions in order to cipher the plain text.

232.

Which of the following is a type of substitution cipher?(a) poly alphabetic cipher(b) transposition cipher(c) columnar cipher(d) rail fence cipherI got this question at a job interview.The question is from Cryptography in portion Cryptography of Data Structures & Algorithms II

Answer»

Correct option is (a) poly ALPHABETIC cipher

Easiest EXPLANATION - In substitution cipher the plain text is REPLACED by cipher text ACCORDING to a FIXED rule. There are two types of substitution cipher- Mono alphabetic and Poly alphabetic cipher.

233.

Which of the following ciphers are created by shuffling the letters of a word?(a) rotor cipher(b) rail fence cipher(c) vigenere cipher(d) hill cipherThe question was posed to me in an internship interview.The above asked question is from Cryptography topic in section Cryptography of Data Structures & Algorithms II

Answer»

Right choice is (B) rail fence CIPHER

Explanation: There are two types of traditional ciphers- Transposition and substitution cipher. In transposition cipher the letters of the GIVEN data are shuffled in a PARTICULAR order, fixed by a given rule. Rail fence cipher is an example of transposition cipher.

234.

What is the meaning of cipher in cryptography?(a) an algorithm that performs encryption(b) an algorithm that generates a secret code(c) an algorithm that performs encryption or decryption(d) a secret codeI got this question by my college director while I was bunking the class.This intriguing question comes from Cryptography topic in division Cryptography of Data Structures & Algorithms II

Answer»

The correct choice is (C) an algorithm that performs encryption or decryption

The BEST I can EXPLAIN: Cipher is an algorithm for PERFORMING encryption or decryption. In cryptography, a set of defined steps are followed to generate ciphers. These are necessary to PREVENT data breach.

235.

In which of the following cipher the plain text and the ciphered text does not have same number of letters?(a) keyword cipher(b) vigenere cipher(c) transposition cipher(d) additive cipherI had been asked this question during an interview for a job.My doubt is from Cryptography in section Cryptography of Data Structures & Algorithms II

Answer»

The correct choice is (B) vigenere cipher

Easy explanation - In transposition cipher and MONO alphabetic cipher the number of letters in the plain text and CIPHERED text REMAIN same. But in poly alphabetic cipher the number of letters change. So here as vigenere cipher is the only poly alphabetic cipher so it will be the answer.

236.

Which of the following is a type of transposition cipher?(a) Rail Fence cipher(b) Hill cipher(c) Rotor cipher(d) One time padI have been asked this question in final exam.I'm obligated to ask this question of Cryptography in division Cryptography of Data Structures & Algorithms II

Answer»

Right choice is (a) Rail FENCE cipher

The best I can explain: In transposition cipher the letters of the given data are shuffled in a particular order, FIXED by a given rule. There are two TYPES of transposition cipher – Rail fence cipher and Columnar transposition cipher.

237.

What will be the ciphered text for the input string “sanfoundry” with key string as “code” to the program of keyword cipher?(a) SCMBNUMERY(b) SSCMBNUMERY(c) NIFO(d) NILOI got this question in an online interview.This question is from Cryptography in division Cryptography of Data Structures & Algorithms II

Answer»

Right option is (a) SCMBNUMERY

The BEST EXPLANATION: Keyword cipher is type of mono alphabetic cipher. In this algorithm the letters {A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z} by

{C,O,D,E,A,B,F,G,H,I,J,K,L,M,N,P,Q,R,S,T,U,V,W,X,Y,Z} respectively.

238.

Which of the following is not a type of poly alphabetic cipher?(a) Auto key cipher(b) Hill cipher(c) Playfair cipher(d) Additive cipherThe question was asked in my homework.My question is taken from Cryptography topic in section Cryptography of Data Structures & Algorithms II

Answer»

The correct choice is (d) Additive cipher

To explain: In poly alphabetic cipher each SYMBOL of plain text is replaced by a different cipher text regardless of its OCCURRENCE. Out of the given OPTIONS, only additive cipher is not a poly alphabetic cipher.

239.

Which of the following is not a type of mono alphabetic cipher?(a) additive cipher(b) multiplicative cipher(c) afffine cipher(d) hill cipherThe question was asked during an interview.Asked question is from Cryptography topic in portion Cryptography of Data Structures & Algorithms II

Answer»

Right answer is (d) hill CIPHER

Explanation: In mono alphabetic cipher each symbol of PLAIN text is replaced by a PARTICULAR respective symbol in the cipher text. There are three types of mono alphabetic ciphers- additive, MULTIPLICATIVE and affine.

240.

Which of the following is a type of substitution cipher?(a) Mono alphabetic cipher(b) transposition cipher(c) transportation cipher(d) transforming cipherI had been asked this question in my homework.This interesting question is from Cryptography in division Cryptography of Data Structures & Algorithms II

Answer»

The correct CHOICE is (a) Mono alphabetic CIPHER

Easy EXPLANATION - In substitution cipher the plain text is replaced by cipher text according to a fixed rule. There are TWO types of substitution cipher – Mono alphabetic and POLY alphabetic cipher.

241.

Which of the following ciphers are created by shuffling the letters of a word?(a) substitution cipher(b) transposition cipher(c) vigenere cipher(d) hill cipherI have been asked this question in an online quiz.This intriguing question originated from Cryptography in section Cryptography of Data Structures & Algorithms II

Answer»

Right answer is (b) transposition CIPHER

Easy explanation - There are two types of traditional ciphers – Transposition and substitution cipher. In transposition cipher the LETTERS of the given data are shuffled in a PARTICULAR order, FIXED by a given RULE.

242.

Which of the following is a type of traditional cipher?(a) transportation cipher(b) transposition cipher(c) transforming cipher(d) vigenere cipherI have been asked this question in an interview for job.My question is taken from Cryptography in section Cryptography of Data Structures & Algorithms II

Answer»

The correct OPTION is (b) TRANSPOSITION cipher

To explain: There are two types of a traditional cipher. First is transposition cipher and the SECOND is SUBSTITUTION cipher.

243.

What is the meaning of cipher in cryptography?(a) an algorithm that performs encryption(b) an algorithm that generates a secret code(c) an algorithm that performs encryption or decryption(d) a secret codeThis question was posed to me in an interview for job.Enquiry is from Cryptography in portion Cryptography of Data Structures & Algorithms II

Answer»

Right choice is (c) an ALGORITHM that performs encryption or DECRYPTION

Easiest explanation - Cipher is an algorithm for PERFORMING encryption or decryption. In cryptography, a set of defined steps are followed to generate ciphers.