Download as pdf or txt
Download as pdf or txt
You are on page 1of 34

WEB DEVELOPEMENT

The another advantage that css using brings in YES


is-better integration with multiple web servers
iss apache etc. do you agree?
we now go over some web development option 1
related stuff - about HTML CSS AND
javascript.now please see the code alongside
and let me know which options is correct
let's start little easier on javascript tell me option 4
what will be the output of the code alongside
now tell me which of the statements opion 2
mentioned alongside are correct. i.e javascript
does not support inheritance though
see the code alongside and let me know what hello, hey, hello
will be the output
A developer told me that -it is not possible to B.no
include javascript and jQuery code on single
HTML page . Do you agree
The variable str contains ids separated by a ans: string.split(',');
comma .I want to convert str into an array of
ids-which method should i use?
A function like this is very in JS what is it Ananymous Function
termed as?
How do you get input value directly in prompt()
javascript without html element? I mean like
alert() displays the message what function can
be used to accept a value in javascript?
okay lets look at Javascript. The variable str split()
contains ids separated by a comma. I want to
convert str into an array of ids - which method
should i use?
the another advantage that css usage brings in No
is-better intergration with multiple web
servers IIS apache etc,,,,"do u agree?
fine. Let's start a little easier on javascript. Tell 2-22
me what will be the output of the code
alongside.

console.log(2+"2"+"2")
Fine: A function like this is very common in undefined function
JavaScript. What is at termed as?
please tell me if I have to create a CSS class for .div{
"div" tag how should I define it? }
Okay. We now go over some web <ol>
development related stuff - about HTML, CSS <li>HTML</li>
and javascript. Now please see the code <li>java</li>
alongside and let me know which option is <li>javascript</li>
used to display list in numbered format. <li>sql</li>
</ol>
OR
<ol>
<li>geetha</li>
<li>meetha</li>
<li>rakesh</li>
<li>arit</li>
</ol>
html/css/ js code along side option to display Option 2 <select><option
select box value=”1”>maths</option>…….</select>
How to create a css class for div tag .div
fine.i presume you know about bootstrap css Option 3 and 4
if not no problem.one does include
Bootstrap.min.css or bootstrap.css, in the
page to use bootstrap. now tell me-Which
statements about these files are correct?
<head> will be rendered with grey background and white text
<style>
Body{background-color:grey;}
H1{color:blue;}…….</body>
got it Now tell me what will be the output in undefined
this code
var test;
alert (test);
Which html element should be used in a form 3. Check Box
if you want the user to choose multiple values
at a time?
variable use in js option 1 & 2
In javascript "this" always refer to depend on context
We now go over some web development Option 2
related stuff-about html,css and <select>
javascript.now please see the code alongside <option value=”1”>……
and let me know which option is used to ……
display select box for a user a value from the </select>
prefilled list?
In the code alongside,the container has width Option 1
of 300px.the items being displayed have each Container width will be executed to fit four divs
width of 100px and there are 4 such items.
What will happen when they get rendered?

<html>
…..
…..
<</html>
I wish to extract the number from this string match()
using javascript function.which is the Match method is used
function?
I was told that jquery is used to execute sql No
queries within browser using javascript do
you agree?
Use of isNaN() function in javascript? Returns true if the value is not a number
It is possible to include javascript and j query Yes
code on single html page.
For div tags to render next to each other in a Option 1,2,3
flex layout. Which of the points are
mandatory?
In javascript to connect a numeric value from Parseint()
string to integer which function will come
handy?
What is the html5 tag is typically used for Body
rendering menu at the top of the page after
header?
About css and web development in general. Option 2 and 3
Go through the options alongside and let me
know what are the correct statements
regarding advantages of css
Which of the statements listed alongside are Insert into employee (id,firstname,lastname,salary)
ddl(data definition language) statement? values(1,joe,..)
8 times
Have a look at the code alongside and let me
know how many times word “ bad” will be
displayed in the output?
For (var i=1;i<=20;i++)


Console.log(“bad”);
}}
We now will go over javascript, html and css Console.log(“message text”)
which from the listed is the correct way to
display debugging messages to the browsers
console using javascript?
Now tell me which of the statements Option 1 and 2
mentioned alongside are correct Javascript supports defining classes and objects
Javascript does not support inheritance though
now if I set j to I instead of 0. What will be the Option 1
output? Less than 100
Set i=o;
Set j=0;
Set count=0;

…….
Print (count)

PYTHON
all right as a trainee developer came to know that Yes this is perfectly legal
python works without specifying variable types, she
wrote something like this.(see alongside)not sure of
this is legal in python. What do you think?

x,y,z = 1,2,”sam”
a bit about looping in python,what will be the FINE OK COOL ALRIGHT
output in this case?

My_list = *‘fine’,’ok’,’cool’,’alright’+
For m in my_list:
print(m)
If(m==’ok’):
continue
Something about iterable. To make custom class _iter_-option 1
iterable. which method need to be implemented?
Here is a typical python question Str=””” this is a”unique”feature”” and
I have a text with a quoted word in it ,as mentioned str = "That is a \"unique\" feature"
below.what is the right way to represent it in
python?
Str =”this is a”unique”feature”
while(true) it will run only if "some condition" is satisfied.
{
// Some code here
if(some condition)
{ break the loop }
}
What will happen if you run a code like the one it will run till some condition is satisfied
shown in the snippet alongside?

while (true)
// Some code here
if (some condition)
break the loop
The process in which python reclaims unused Garbage collection
memory block at periodic interval is termed as
Which key word is used when writing a function def
python
Now tell me what an extra key inserted at the end sentinel
of the array is called?
Just tell me what will be the output? 12.5

x=100i
x=x/8
print(x)
when I try to execute following line of code, it print(int(str) + n))
generates a typeerror.how can I fix this to have
output as 100
When I try to execute following line of code, it print((int)str+n))
generates a typeerror. How can I fix this to have
output as 100

a= '34'
b= 66
print (a+b)
Python hands on – sumEven
for i in arr:
Arr=[10,19,16,22,10,19] if arr[i]/2==0:
Num=int(input()) sumEven +=arr[i]
Arr.append(num)
Sumeven=0 OR

for i in arr:
if i%2==0:
sumEven +=i
Let me know which statement mentioned about Option 2 and 3
tuples and lists are correct The values of elements in a tuple can not be updated
The lists can have more than two elements
dictionary in python using list # Creating an empty dictionary
myDict = {}
# Adding list as value
myDict["key1"] = [1, 2]
# creating a list
lst = ['Geeks', 'For', 'Geeks']
# Adding this list as sublist in myDict
myDict["key1"].append(lst)
print(myDict)
my_dict = {1: 'laptop', 2: 'TV', 3:'Smartphone'} for i,j in my_dict.items():
key_list = [] key_list.append(i)
value_list = [] value_list.append(j)
my_dict[4] = input()
Here is a typical python question (the string one) option 1
Accept and store a two digit integer in an array, Add arr = [10,19,16,22,10,19,18,12]
only those numbers from the array which have only num = int(input())
one occurence, You should store the sum in variable arr.append(num)
named sumNoDup, The number entered may or sumNoDup = 0
may not be duplicate, You should not print the if num == 10 or num == 19:
output, sumNoDup is printed at the end. sumNoDup = sum(arr) - 58
elif num in [16,22,18,12]:
arr = [10,19,16,22,10,19,18,12] sumNoDup = sum(arr) - 58 - num
num = int(input()) else:
arr.append(num) sumNoDup = sum(arr) - 58 + num print(sumNoDup)
sumNoDup = 0
or
arr = [10,19,16,22,10,19,18,12]
num = int(input())
arr.append(num)
sumNoDup = 0
dic={}
for I in arr:
if I in dic:
dic[i]+=1
else:
dis[i]=1
for I,j in dis.items():
if j==1:
sumNoDup+=i
print(sumNoDup)

a=10 1000
b=3
print(a**b)
I wish to extract the number 40 from this string substring function
using javascript function. Which is that function?
multiple variable assignment legal in pyhton yes, it is legal
x,y,z=....
What will be the size of the directory in the case Answer: 4
alongside?
My_dict={}
Key_list=[100,200,300,400]
Value_list=*‘sam’,’tom’,’pat’,’not’+
For I in range(len(key_list)):
my_dict[key_list[i]]=value_list[i]
Size=len(my_dict)
Print(size)
how many times "Bad" will be displayed in the 8 times Bad will Display
output?
Which keyword is used while writing a function in def
python?
Predict the output of the python code alongside. 1
2
‘abc’ in ,:’abc’,2:’pqr’,3:’xyz’-: 4
Print(1)
Print(2)
If ‘a’ in ‘xyz’:
Print(3)
Print(4)
same as 178. 0
Now look at the pseudo code alongside and answer TRUE
the question

a= 61, b= 34, c=10;


print((a>45) or (b>50 and c>10))
A trainee programmer rewrote the code from last TRUE-yes
example (code snippet A) as mentioned in the code
snippet B.Do you agree both will function the same?
A=61,b=34,c=8
if((a>45 or b>50)and(c>10))
{
if(a>45)
{
print((a>45 or b>50) and (c>10));
}}
Else
{
print((a>45) or (b>50 and c>10));
}
Which values of a b and c will lead to not printing Option 1
any output?

if((a>45 or b>50)and(c>10))
{
if(a>45)
{
print((a>45 or b>50) and (c>10));
}}
Else
{
print((a>45) or (b>50 and c>10));
}
A=61,b=34,c=8 true
What will be output of the following code?

print((a>45 or b>50)and(c>10))
Which of the logical conditions below are equivalent Option 1 and 3

1) print((a>45) or(b>50 andc>10))


2) print((a>45) and not (b<=50 or c<=10))
3)print((a>45)or(b<=50 orc<+10))
Arraymatch=[] Word1=set(sentence_2.split())
Sentence_1=input() Word2=set(sentence_1.split())
Sentence_2=”this one is just a perfect idea waiting arrMatch=list(words1.intersection(words2))
for completion”
My_dict={} For I in range(0,len(key_list)):
Key_list=[100,200,300,400] Mydict[key_list[i]]=value_list[i]
Value_list=*‘BOM’,’LHR’,’JFK’,’SIN’+ Print(mydict)
Which of the statements mentioned alongside are Option 1 and 2
correct?
1.variables defined using ‘var’ inside a function are
local variables
2.variables defined outside a function have global
scope,irrespective of using var or not
Which statement will never get printed irrespective
of values of ages ram, sam and raj Option 1
If((raj>45 or …….. If it prints a it will print c
…..
….
Else
{
print(statement D)
}

Which of the ways mentioned alongside are the Option 1,2,3


correct,for invoking func()?

Def func(x=20,y=0):
Return(x+y)
Inside a function, if a value assigned to any local
undeclared variable, that variable will get created
with_______scope.
Concept of array in programming is pretty effective Loops
due to _______
arrayUnique=[] For I in sentence:
sentence=input() arrUnique.append(i)
… arrUnique.sort()
….
Arrunique.sort()
Print(arrunique)
which one will be complete the evaluation Option:2
/execution faster?
What will be the output of the code snippet 101
alongside?

X=101
Def somefunction()
X=67
Somefunction()
Print(x)
Here is the original code back if I change the Also takes given as output
condition from < to <= for both the loops what
should be the output?
Programmers prefer to write a function calls itself. Recursion
What so you call such a function?
Age should be between 18 and 60 both inclusive? Age>=18 AND age<=60
Tup1=[10.3] Error as tuples are immutable
Tup[0]=100
Print(tup1)
Set i=0; 100
Set j=0;
Set count=0;
Loop till i<10…
…..
….
Print(count);
SQL
Which of the following keywords listed alongside Aggregate function=(max ,count,min,sum,avg) OPTION 3
are aggregate functions? AND 4
which of the statement(s) about JOIN is correct. Option 1 & 2
Both 1 and 2 are correct
there are departments which do not have any select * from department
employees. I would like to have list of such where employee="null"
department name in asc? sort by name
OR
select deptno from emp
where deptno is null or deptno=0;
Hands on task list the first name of all the select first_name from employee where dob in ('1970-
employees born on or before 1st January 1970 in 01-01')
asc order of first name. order by first_name asc;
what is the command to empty a database table?I ANS: Truncate
do not want to delete the table, just delete all its
contents.
Which of the statement are correct option 1 & 4 1.function can return vaue 4. procedure
cannot return a value
Which statements are correct 1)merge sort worst
case time complexity is better than quick sort 2)
Merge sort takes more space than quick sort
Write a sql to get the count of departments from Select count(*) from department
departments table that do not have a manager. Where department not in manager;
what is the problem with the sql statement where clause is missing
alongside? assuming that the field and table
names are correct

select order_date, count(*)


from order
group by order_date
While using a transaction what is the command to rollback
tell the database to undo all the work done within
the given transaction?
Now about database concepts. Tell me - which of Atomicity
the ACID database property states that either
entire transaction completes or nothing takes
palace at all
list departments and their no. asc select deptno,count(empno) from emp
where deptno is not null
group by deptno
order by deptno asc;
Please write an SQL to get the count of employees SELECT * FROM employees WHERE first_name like 'A%';
who's first_name starts with letter 'A'
I am trying to get the list of department names Select dname,count(emp.empno) from emp
with their employee count.it works fine but does Inner join dept on emp.depno=dept.depno
not list the names of departments (sales 1005 and Where sales not in (1005,1006)
finance 1006) that do not have any employees Group by dname
yet.can you please ensure they also get listed with Order by dname;
count as 0?
Now can you display the list of departnents and Select dept from employees
their number of employees in the ascending order Order by employees asc
of the number of employees?(do not list the Emp where dept=employees;
departments which do not have employees.)
Get name of the city to which the employee with Select city from employee where max(basic_salary);
highest basic salary belongs. I have provided the Or
partial select statement. Select city from employee order by where salary=(select
max(salary) from employee)
Which of the statements listed along-side may Option:3
have a potential of raising duplicate primary key Insert into employee(id,firstname,lastname,salary)
error? Assume emp_id to be a primary_key Values(1,’joe’,’doe’,22000)
Write a query to list the first name of all the Select first_name from employee where
managers (employees with designations as Designation=”manager” order by
manager) in ascending order of first name First_name asc;
Write an sql to get the count of departments from Select count(dept.name)
department table that do have a manager. From dept inner join emp
On dept.deptno=emp.depno
Where job not in (‘manager’);
Please write a query to list the first name of all the Select ename from emp where job=’manager’
managers(employees with designation as Order by ename;
managers) in ascending order of first name
Which of the keywords listed alongside are Option 1,2 and 4
considered as constraints? Primary key,foreign key,not null
All the latest statements manipulate data and Yes
hence quality as dml and not dml
Let me know which of the statements listed Option 1 and 2
alongside are correct Primarykey…..
foreign key in another table…
TESTING
1 while teting a software , what should be the primary focus option no. 3 . prioritize

2 if you have to prepare testcases for a software, what will you use as your option 1) requirements
primary reference documents

3 very important from application maintenance/product releases etc. One Regression testing
needs to test the software to ensure that pre existing functionality works
without any problem when you rerelease some new features. What is the
term used for such a testing?

4 okay lets discuss about testing now.acceptance testing can be considered Yes
as black-box testing do u agree?

5 can u tell me widely used tracking tool? bug herd

6 term used for the artefact, which captures users req user story

7 Acceptance testing can be considered as black box testing yes

8 when do you generate the flowchart before writing the program

9 An acceptance criteria should be part of a user story TRUE

10 The testing which is typically carried out by the end user towards the end Acceptance Testing
other
11 Unit testing is a part of static testing activity Correct
Agile and Scrum
1 can u tell me what is the term used for -a measure of the amount of works ans. velocity
a
team can complete during a single sprint

2 now lets discuss about agile and scrum .tell which of the statements d. option 1 and
mentioned are correct 3

3 now choose the inputs to sprint planning meeting b. option 1 and


2
4 can u tell me what is the term used for -a measure of the amount of works ans. velocity
a
team can complete during a single sprint

5 what is the term used for a measure of the amount of work a team can Velocity
complete durinng a single sprint

6 4 product Owner
who owns product backlog and prioritisation in agile methodology

8 tell which of the statements mentioned are correct option 1 and 3

9 Burndown charts visually show work being completed in comparison to TRUE


work that still needs to be done.

10 scrum and kanban are two different strategies used TRUE


to implement agile methodology and they are not the replacement of
agile"

11 An acceptance criteria should be part of user story not a sprint of backlog? TRUE

12 scrum and kamban are two different strategies used to implement agile FALSE
methodology and they are not the replacement of agile . True or false

13 Scrum methodology has three roles product owner ,Scrum


master,Team

14 Typically who is responsible for daily stand-up meeting Scrum Master

15 Story point per week is a measure of ? Velocity

16 who owns product log and prioritizes Product Owner

17 Please see the options alongside and let me know which are the statements Option 1
are correct
18 Please look at the statement alongside and let me know if true or false TRUE

19 Scrum Artefacts Product backlog,sprint backlog


and increments
Cloud Computing
1 Tell me which of the points listed alongside are cloud essential c. option 1,2,3
characteristics

2 who manages the application deployement and upgrades in saas offerning? b.option 1

3 The software that makes virtualization possible on a server is termed as ans: hypervisor

4 in terms of increasing level of responsibility for the cloud provider the 3 1 2 ( IaaS PaaS SaaS )
service where cloud provider has least responsibility should come first ?

5 How will you clasify Gmail as? option 2 ( saaS )

6 In cloud concepts. Which Out of the listed items may be shared in a doud option 1 (network router )
with in multiple customers?

7 who manages the application deployment and upgrades in saas offering? Cloud service provider

8 In cloud infrastructure which is able automatically expand or compress cloud elasticity


infrastructure such as storage,memory?

9 google drive to save my document . what kind of model IaaS

10 Which of the points listed alongside are cloud essential characteristics Option 1,2,3

11 Which Cloud characterstic makes it possible to change customers based Rapid elasticity
upon their usage
12 Iaas means Infrastructure as a service

13 Virtual machine in a cloud Iaas

14 Some major cloud service providers Aws,Googlecloud,ibm cloud


,oracle,SAP
15 Classify Gmail as saas

16 Google drive to save my documents as saas


DATA STRUCTURE

1.

ANS:

In stack 2 - Top element will be 1 and bottom element will be 5

2. element will be take


ANS:

10n bytes
3. Which statements along sidedosent apply to binary search –
i)The data to be searched must be sorted.
ii)It returns position of the item and not value of the item

ANS:
Both are true.

4. About trees and graphs


ANS:
option 2 and 3
(every tree is a graph
some graphs can be tree)

5. algoritghm while searching in a 51 items having unique values


ANS:

option 1 and 2

6. The common term used to adding data item to a stack?(DATA STRUCTURES)


ANS:
Push

7. size of stack1 after the code gets execute


ANS:
0

8. tree and other data structures


ANS:
1. even nodes.
2. 2^k nodes at k-th level

9. Okay, let's see the binary to decimal stuff-Can you tell me which is the binary
equivalent of decimal number 67?
ANS:
10000011

10. which of the following does stack uses manipulate data


ANS:
LIFO

11. So you must be aware about the common term used to adding data item to a
stack?
ANS:
Push.

12. acid properties in dbms state either entire transaction completes?


ANS:
atomicity, consistency, isolation, and durability.

13. Python works without specifying variable types, she wrote something like this. x,y,z =
1,2,"Sam"?
ANS:
Yes, This is perfectly legal.

14. who owns product log and prioritizes?


ANS:
Product Owner.

15. a= 61, b= 34, c=10;


print((a>45) or (b>50 and c>10))
ANS:
TRUE.

16. a =61, b=34, c=8; if((a>45 or b>50)and(c>10)){ if(a>45){ print((a>45 or b>50) and
(c>10)); }} else{ print((a>45) or (b>50 and c>10)); }
ANS:
TRUE.

17. Output redirection can be achieved using?


ANS:
using > symbol

18. Which statements along side dosent apply to binary search –


i)The data to be searched must be sorted.
ii)It returns position of the item and not value of the item.
ANS:
Both are true.

19. Concept of arrays in programming is primonly effective due to?


ANS:
Loops.

20. stack use in order to manipulate the data?


ANS:
LIFO(last in first out).

21. which of the keywords are aggregate functions?


ANS:
Max and count ( Option 3 and 4 ).

22. which of the statements are correct?


1)In programming functions can return a value .
2) In programming functions cannot return a value.
3)In programming procedures can return a value.
4)In programming procedures cannot return a value.
ANS:
option 1 and 4.

23. The common term used to adding data item in stack?


ANS:
Push.

24. which is to be consider worst case time scenario in linear search algorithm?
ANS:
item is the last element in the array.

25. Now tell me what an extra key inserted at the end of the array is called?
ANS:
Sentinel.

26. Tell me which of the statement(s) along side doesn't apply to binary search?
ANS:
it returns to the position of the item and not value of the item.

27. what is the collision of hash in hashtable?


ANS:
two programs access smae element using different hashes.

28. Fine. Now, if I want an expression in which the last character is not numeric. Which
expression is a correct wildcard pattern?
ANS:
*[!0-9]
29. While passing a large data to a function which method will be more efficient from
perspective speed?
ANS:
Pass by reference.

30. Story points per week in a measure of?


ANS:
option 2: velocity.

31. The fastest possible way to access the elements in a random array?
ANS:
option 3 : using the index.

32. concepts of array in prgm primarily effective due to?


ANS:
Functions.

33. In computer programming when flow charts used?


ANS:
before the program.

34. Read the question and answer the options?


ANS:
Option 3.

35. In cloud infrastructure which is able automatically expand or compress infrastructure


such as storage,memory?
ANS:
cloud elasticity.

36. can u tell me widely used tracking tool?


ANS:
bug herd.

37. look at pseudocode and answer?


ANS:
print ((a >45) OR (b> 50 AND C> 10)).

38. An acceptance criteria should be part of user story not a sprint of backlog?
ANS:
TRUE.

39. Cloud concepts and virtualization. The software that makes virtualization possible on
a server is termed as?
ANS:
Hypervisor.

40. can you tell me which commant can be used to manage resource limit of a user
session in linux?
ANS:
Unlimit.

41. if you know the unlimit then you may also know about soft and hard limits on
resources.tell me which statements are correct?
ANS:
soft limit can never be greater than hard limit.

42. to make the script interactive which command is used? i mean rather than providing
command line arguments how do you get the input just in time?
ANS:
Prompt.

43. In terms of increasing level of responsibility for the cloud provider the service where
cloud provider has least responsibility should come first ?
ANS:
3 1 2 ( IaaS PaaS SaaS ).

44. How will you clasify Gmail as?


ANS:
option 2 ( saaS ).

45. In cloud concepts. Which Out of the listed items may be shared in a doud with in
multiple customers?
Ans:
option 1 (network router ).

46. what is the term used for a measure of the amount of work a team can complete
durinng a single sprint ?
ANS:
Velocity.
47. The fastest possible array to access the element in a random array ?
ANS:
Using Binary Search.

48. Can you tell me how much memory n byte an array of 10 elements occupy if each
element is of 'n' bytes?
ANS:
10n bytes.

49. Set i = 0; Set j = 0; Set count = 0; Loop till i < 10 { Set j = 0; Loop till j < 10 { Increment j
by 1; Increment count by 1; } Increment i by 1; } print(count); ?
ANS:
100.

50. Burndown charts visually show work being completed in comparison to work that
still needs to be done?
ANS:
TRUE.
Shell Scripting & Linux

1. #|/bin/bash
my_var=”Skill”
echo my_var
echo \”$my_var
echo $my_var

2. ((area=1.5*2))
echo $area

3. String1=”Shell”
String2=”Script”
String3=$string1+string2
echo $string3

OUTPUT:

Shell+Script

4. for a in 2 3 4 5 6 7 8
do
if [$a==5]
then
break
fi
echo “$a “
done

output:
2
3
4

5. read userinput
if[ $userinput==BYE ]; then
echo “Good “$userinput
else
echo “Welcome “$userinput
fi

OUTPUT:
Good BYE

6. read area
area_square()
{
echo $(($area*$area))
}
area_square $area

OUTPUT:

4
16

7. #|/bin/bash
Count=0
read divisor
for n in 10 12 15 20 30 51 64 80
do
if [ n % divisor == 0 ]
then
count=count+1
fi
done
echo $count

OUTPUT:

8. The developer is trying to run a shell script inside another shell script. Do you think it
will work?
ANS:
Option 1.

(Yes it will work)

9. Cd/home/testdata
echo “$?”
ANS: 0

option 4.

10. Tell me how will you save a file and exit the editor?. I mean what command will you
use in vi?
ANS: :wq

11. Look at the shell script along side tell me what will be the output if i execute it?

#!/bin/bash

((area=1.5*2))

echo $area

ANS: None of these

12. What will be the output?


#!/bin/Bash
my_var="skill"
echo my_var
echo \"$my_var
echo $my_var

ANS: Option 1
(my_var
“Skill
Skill)

13. write a code for area of square?


ANS:
read area
area_square()
{
echo $(($area*$area))
}
area_square $area

14. Write a program to find the whether the name where is found?
ANS:

read user_input
name=(sam ram pam tam leele pat)
foundat=0
i=1
for name in ${name[@]};
do
if [ $name == $user_input ];
then
foundat=$i
echo "Name is found at "$foundat
else
i=$(($i+1))
fi
done
echo $foundat

15. Write a program for whether the two number are equal or not?
ANS:

a=1
b=1
if [ $a == $b ];
then
echo "Equal"
else
echo "Not Equal"
fi

16. Write a program for k=1 k=2 k=3 ……k=5?


ANS:

read k
for ((i=1; i<=k; i++))
do
for((j=1; j<=k; j++))
do
echo -n $i" " $j $'\n'
done
done

17. Which of the following is not used as a wildcard in linux?


ANS:
$ is not used as a wildcard

18. Which directory is used to store configuration files in linux?


ANS:
/etc

19. str="""That is a "unique" feature"""


do
echo $i $j
$(($i+1))
done
$(($j+1))
done
Read the requirement and fix it. if [ $a == $b ]
then
echo "a is equal to b" end-if
ANS:
end-if should be fi

20. #!/bin/bash
cd /home/testdata echo "$?"
ANS:
0

21. Can I install windows OS for VM which is to be created on a HOST Server runinglinux?
ANS:
Yes, certainly

22. Which one of the following command will be used to searching "subject" text in
syllabus.txt file??
ANS:
grep "subject" syllabus.txt

23. Now look at the script along side I want to print "a is equal to b", in order to do that
which relational operator should I use??
ANS:

-eq

24. In shell script which sign is used to print the total number of command-line
argument passed
ANS:
$#

25. Tell me how do i pass the output of a program to another linux?


ANS:
using pipe

26. Which command is used for to find file from current directory?
ANS:
C. find . -name example.txt

27. what is the significance of the "/root" directory in Linux?


ANS:
directory of all the directories in the file system

28. Create the dictionary from two lists.(linux)task.txt will run after giving Executing
permission??
ANS:
Yes

29. Check the number are equal or not => Shell Script
ANS:
#!/bin/bash
a=1
b=1
if [ $a == $b ];then echo "Equal hai"
else
echo "Equal nahihai"
fi

# "Alternative method"
# -eq is same as "=="

if [ $a -eq $b ];then echo "Equal hai"


else
echo "Equal nahihai"
fi

30. okay.which of the following is responsible for print current process id?
ANS:

echo$$

31. All right.Which of the following command sets the execute permission to the shell
file?
ANS:
chmod+xthe_file_name

32. What will happen if press in Ctrl-Z key combination in shell, choose the correct
option from along side?
ANS:
suspends the process and running the shell

33. which of the following is responsible for print current process id


ANS:
c. echo $

34. Which of the following is not used as a wildcard in linux?


ANS:
c. $ is not used as a wildcard

35. end-if In which directory Employee.txt will get copied??


ANS:
4. end-if should be fi

36. cp Employee.txt ..
ANS:
b. Parent Directory

37. Tell me ho do i pass the ouput of a program to another in Linux?


ANS:
2. Using Pipe

38. Output redirection can be achieved using?


ANS:
using > symbol

39. Permission for rwx_rw_rw


ANS:
3. only owner can execute it

40. #!/bin/bash cd /home/testdata echo "$?"


ANS:
4. 0

41. can u tell me which of the names mentioned alongside are linux distributions
ANS:
c. options 1,2,3

42. now tell me what the use of crontab


ANS:
c.option 3

43. which of the following command will be used for searching "subject" text in
syllabus.txt file?
ANS:
option 4

44. Write a function to return area of square Read the requirement and fix it. if [ $a ==
$b ] then echo "a is equal to b" ?
ANS:

#!/bin/bash read area


Area_square(){
echo $(($area*$area))
}
Area_square $area

45. 00 11,16 * * *
In shell script which sign is used to print the total number?
ANS:
Run the backup every day of every month from 11 AM to 4PM.

46. Now look at the script along side I want to print "a is equal to b", in order to do that
which relational operator should I use??
ANS:
a. –eq

47. which of the following command sets the execute permission to the shell file?
ANS:
chmod +x the_file_name

48. Tell me how do i pass the output of a program to another linux?


ANS:
Option 2 (using pipe)

49. of command-line argument passed


ANS:
$#

50. If you know ulimit then you may also know about soft and hard limits on
resources.tell me which statements are correct
ANS:
b.option 2

51. What will be the file permission after chmod 714 ?


ANS:
because 7 is rxw and 1 is x and 4 is for r so
basically it should be rwx_xr_

52. Which command is used for to find file from current directory ?
ANS:
C. find . -name example.txt

53. Which one of the following command will be used to searching "subject" text in
syllabus.txt file??
ANS:
grep "subject" syllabus.txt

54. Which of the keywords listed alongside are aggregate functions?


ANS:
Option 1 and 2
(distinct and union)

55. nano editor how do you come out of editing to save file?
ANS:
ctrl+x.

56. Python works without specifying variable types,she wrote something like this see
alongside not sure if this legal in python what do you think?
ANS:
Yes,This is perfectly legal.

57. What will the script alongside print?


#!/bin/bash
for i in 3
do
echo "hi"
done
exit 0

ANS:
“Hi” only once.

58. Whatwill happen if you run a code like the one shown in the snippet alongside?
while(true)
{
//some code here
if(some condition)
{
break the loop
}
}
ANS:
option 2

59. which statement are correct?


a).Merge sort worst case time complexity.
b).Merge sort takes more space .
ANS:
option 1 or 2
60. which of the following statement are correct?
a).In Programming function can .
b).in programming function cannot .
c).in programming procedures can return.
d).in programming procedures cannot return.
ANS:
option 1 and 4

61. The another advantages that CSS usage brings in is – better integration with multiple
web services IIS Apache etc.. Do you agree?
ANS:
Yes.

62. Look at the scenario along side and tell me correct option?
#!/bin/sh
date=$(date ‘+%d-%m-%y’)
echo $date.
ANS:
Yes it will work

63. To make a custom class table which method need to be implement?


ANS:
option 1 and 2

64. What will happen if you run a code like the one shown in the snippet alongside?
ANS:
Option 2 It will run till "some condition" is satisfied.

65. have a look at the pseudocode alonside and answer the question?
ANS:
option 3 and 1.

66. In shell scripting which type of variable we cannot unset?


ANS:
Readonly.

67. Which command is used for to find file from current directory?
ANS:
C. find . -name example.txt
68. In shell script which sign is used to print the total number of command-line
argument passed?
ANS:
$#

69. variable use in js?


ANS:
option 1 & 2.

70. Scrum and kanban are two different strategies used to implement the agile
methodology and not the replacement?
ANS:
TRUE.

71. aggregate function?


ANS:
option 3 & 4.

72. Which one of the following command will be used to searching "subject" text in
syllabus.txt file?
ANS:
grep "subject" syllabus.txt.

73. how many times "Bad" will be displayed in the output?


ANS:
8 times Bad will Display.

74. which of the following is responsible for print current process id?
ANS:
echo $$.

75. Can I install windows OS for VM which is to be created on a HOST Server runing
linux?
ANS:
a. Yes, certainly.

76. #!/bin/bash
cd /home/testdata
echo "$?"
ANS:
4. 0
77. Which is the valid variable from below list?
ANS:
3. VAR_1.

78. In which directory Employee.txt will get copied?? cp Employee.txt?


ANS:
b. Parent Directory.

79. Permission for rwx_rw_rw?


ANS:
3. only owner can execute it.

80. If you know ulimit then you may also know about soft and hard limits on
resources.tell me which statements are correct?
ANS:
b.option 2.

81. task.txt will run after giving Executing permission?


ANS:
Yes.

82. can u tell me which of the names mentioned alongside are linux distributions?
ANS:
c. options 1,2,3.

83. now tell me what the use of crontab?


ANS:
c.option 3.

84. which of the following command will be used for searching "subject" text in
syllabus.txt file?
ANS:
option 4.

85. To make the script interactive which command is used? i mean rather than providing
command line arguments how do you get the input just in time?
ANS:
d. read.
86. you must be knowing about "su" command. tell me what the listed command is
doing?
ANS:
c. option 3.

87. if i save the shell script with task.txt instead of "task.sh" and just add execute
permission for the world to "task.txt".?
ANS:
a. yes.

88. here are a few statements about linux shell. please check which are correct?
ANS:
option 1 and 3.

89. let's have a look at redirections pipes, etc. in linux. tell me which of the following
symbols can be used to send the o/p to another prog?
ANS:
b. >>.

90. how do i pass the output of a program to another in linux?


ANS:
c. option 2.

91. look at the command alongside, is somefile.txt being used for input redirection or
output redirection?
ANS:
output redirection.

92. what is the purpose of "export" command in linux?


ANS:
a. option 1.

93. which of follow ing is not used as a wild card in linux?


ANS:
$.

94. In linux,which of the symbol(s) can be used to send the output to another program?
ANS:
Option 1.
.
95. install windows OS for a VM which is to be created on a host server running linux?
ANS:
option 1: Yes certainly.

96. Agile and scrum concepts. Please let me know if this statement is true-"scrum and
kanban are two different strategies used to implement agile methodology and they
are not the replacement of agile" ?
ANS:
TRUE.

97. scrum methodology suggests a standup meeting,should be used for planning the
overall deliverables and not to resolve what challenges are faced by individuals?
ANS:
TRUE.

You might also like