PurpleTalk Fresher Interview Questions – Part – III

PurpleTalk Fresher Interview Questions – Part  – III 

In this blog we are discussing about PurpleTalk Fresher Interview Questions – Part  – III in a detailed manner with various examples . Some of them are : 

     Already we have discussed some problems in the previous session blog PurpleTalk Fresher Interview Questions – Part  – I and Part -II . So we explain few more examples for further questions .  


REFERENCE
 : PurpleTalk Fresher Interview Questions – Part  – I and Part – II 

            https://payilagam.com/blogs/purpletalk-fresher-interview-questions-part-i/

            https://payilagam.com/blogs/purpletalk-fresher-interview-questions-part-ii/

Sort  the list and print in ascending order .

ANSWER :

Write a program to find all distinct words from the given file. Remove special chars like “.,;:” etc. Ignore case sensitivity.

For example :

Write a statement that verifies the condition before entering into a loop . Check whether the next iteration should occur do while executes or not first without checking it and after finishing it each will execute the body of it at once .

Output:
the

while

statement

verifies

condition

before

entering

into

loop

to

see

whether

next

iteration

should

occur

or

not

do-while

executes

first

without

checking

it

after

finishing

each

will

always

execute

body

of

a

at

least

once

_______________________________________________________________________________

2. Program to find the common part of the given two strings ?

Check if two strings have a common substring

You are given two strings str1 and str2. You have to check if the two strings share a common substring.

Examples : We have two different examples for better understanding . 

  Eg 1 . Input : str1 = “HELLO” str2 = “WORLD”

   Output : YES

Explanation : The substrings “O” and “L” are common to both str1 and str2

  Eg 2 . Input : str1 = “HI” str2 = “ALL”

   Output : NO

Explanation : Because str1 and str2 have no common substrings .

 ______________________________________________________________________________

      Thus the above examples had given us the brief explanation about some basic programming questions.