0% found this document useful (0 votes)
49 views35 pages

Se-Primers-Database: (Multiple Options)

Uploaded by

AKSHAY RATHORE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views35 pages

Se-Primers-Database: (Multiple Options)

Uploaded by

AKSHAY RATHORE
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

SE-PRIMERS-DATABASE

1] In what manner the array elements are stored in the memory location ?

A] Contiguous

B] Random

C] Both Contiguous and Random

D] None of the options

2] Assume below code present in the HEAD tag of a HTML page

<style> #myclass{ background-color: lightgrey; color:blue; } </style>

Identify the appropriate HTML code to Use the Style given above. Choose most
appropriate option

A] <h1 id=“myclass”>Welcome to My Homepage</h1>

B] <h1 style=“myclass”>Welcome to My Homepage</h1>

C] <h1 class=“myclass”>Welcome to My Homepage</h1>

D] <h1 class=“.myclass”>Welcome to My Homepage</h1>

3] Which of the following algorithm(s) is/are said to be non-adaptive ?

[ Multiple Options]

A] Selection Sort

B] Merge Sort

C] Bubble Sort

D] Insertion Sort

4] Carefully read the question and answer accordingly :

Efficiency of an algorithm is based on the CPU time, memory usage, disk usage and
network usage

State True or False.

A] True

B] False
5] _________ is used to alter the program flow, when a set of statements need to be
executed only if a condition is fulfilled.

A] Conditional statements

B] Looping statements

C] Iterative statements

D] Sequential statements

6] Which of the following is the correct HTML form element to create the checkbox in a web
page ?

Choose most appropriate option.

A] <checkbox>

B] <input=checkbox>

C] <input type=“checkbox”>

D] <input checkbox>

7] The USING clause is used when ? [Multiple Options]

A] You want to create a nonequijoin.

B] The tables to be joined have multiple NULL columns.

C] The tables to be joined have columns of the same name and different data types.

D] The tables to be joined have columns with the same name and compatible data types.

8] When constructing looping statements, if the iteration condition is not terminated, it will
result in infinite loop. State True/False.

A] True

B] False

9] Predict the output of the program :

startprogram

public class Z {

public static void main(String args[]) {

int a1[] = new int[10];

int a2[] = new int[] { 1, 2, 3, 4, 5 };

System.out.println(a1.length + “ ” + a2.length);
}

endprogram

A] 0 10

B] 10 5

C] 10 0

D] 5 10

10] Predict the output of the program :

startprogram

public sum {

public static void main(String args[]) {

int c = 0;

switch (c) {

case 0 :

System.out.println(“car ”);

case 1 :

System.out.println(“book ”);

break;

case 2 :

System.out.println(“pen ”);

break;

default :

System.out.println(“default ”);

endprogram

A] car

B] default

C] car book
pen
D] car book

11] Predict the output of the program :

startprogram

public class Program {

public static void main(String args[]) {

String input = “Programming”;

char c = input.charAt(11);

System.out.println(c);

endprogram

A] g

B] i

C] Runtime error

D] n

12] Predict the output of the program :

startprogram

public class Program {

public static void main(String args[]) {

String input = “Programming”;

char c = input.charAt(10);

System.out.println(c);

endprogram

A] g

B] i

C] Runtime error

D] n
13] Predict the output of the program :

startprogram

class X {

public void cal(int a) {

System.out.println(a * 100 );

public void cal(double d) {

System.out.println(d / 2);

public class demo {

public static void main(String[] args) {

new X().cal(100.0);

endprogram

A] 50

B] 100

C] 50.0

D] 100.0

14] Which statement is true

with respect to ‘Merge’ command ?

A] Merge command

performs insert

B] Merge command

performs update

C] Merge command

performs upsert

D] Merge command

replace the entire record set


15] Carefully read the question and answer accordingly :

A simple algorithm may have high complexity, whereas a complex algorithm may have
lower complexity in the sense of time needed for the computations. State True or False.

A] True

B] False

16] The CUSTOMER table has following structure cust_id number(5), cust_name
varchar2(30), cust_street varchar2(30), cust_city varchar2(30). Which of the below options
would display all the customer names who all have the substring ‘Main’ in their street.

A] Select cust_name from customer where cust_street like ‘%Main%’;

B] Select * from customer where cust_street=’Main’;

C] Select cust_name from customer where cust_street=’Main’;

D] Select cust_name from customer where cust_street in(’Main’);

17] Which of the following is/are the inline html elements ?

(i) <i>

(ii) <h6>

(iii) <a>

Choose most appropriate option.

A] (i) and (iii)

B] (ii) and (iii)

C] only (i)

D] (i), (ii) and (iii)

18] <!DOCTYPE html>

<html>

<body>

<script>

var x = ( 3 + 3 ) + 4 + “6”;

alert(x) ; //line 1

</script>

</body>

</html>
What will be printed in alert box in line 1 ? Choose most appropriate option.

A] 3346

B] 646

C] 106

D] 16

19] Which of the commands is used to modify the structure of a table ?

A] Alter table

B] Modify table

C] Change table

D] Replace table

20] If an exit condition is not met in a loop, the loop results in ________.

A] Infinite loop

B] No execution

C] One time execution

D] Finite Loop

21] Which one of the following tags is used to display a web page within a web page ?

A] link

B] image

C] iframe

D] mark

22] Which one of the following functions returns x, rounded upwards to the nearest
integer?

A] ceil(x)

B] round(x)

C] trunc(x)

D] floor(x)
23] Writing a detailed algorithm for each of the module identified is performed in which of
the below phase ?

A] Low Level Design

B] Coding

C] High Level Design

D] Testing

24] The Child Class can acquire the properties of its parent class and it cannot have any new
properties of its own ? State True or False.

A] True

B] False

25] Which of the following statements is true ?

A] The operand in an expression must always be a constant.

B] The operand in an expression must always be a variable.

C] The operand in an expression can be a variable or a constant.

D] An operand is not a mandatory element in an expression.

26] Consider the following methods :

int add(int a, int b) {…………….}

String add(String a, Stringb) ) {……………}

What concept of OOP is implemented in the above snippet.

A] Method overloading

B] Method overriding

C] Method overflow

D] Method hiding

27] Consider the below code snippet :

startprogram

<!DOCTYPE html>

<html>

<body>
<style type=“text/css”>

div{ color: blue; }

</style>

<div id=“tag1”>

Cascading Style Sheets (CSS) is a style sheet language used for describing the

presentation of a document written in a markup language.

</div>

</body>

</html>

endprogram

What type of selector is used in the above code ?

A] Attribute selector

B] Element selector

C] Class selector

D] Universal selector
PRIMMER DUMP

1. If you are asked to do a modular software design, which combination of coupling and cohesions
should you use for designing the software?

a. High cohesion and high coupling

b. High cohesion and low coupling

c. Low cohesion and high coupling

d. Low cohesion and low coupling

2. Statement: For a logically cohesive module, there are some activities to be implemented. These
activities are preferred from inside the module itself. Is the above given statement true? If not,
choose the correct option to make it true.

a. The activities are selected from outside the module.

b. The activities are selected in a random manner.

c. The activities are selected in a sorted manner.

d. The given statement is true.

3. What kind of controlled structure is used when we don’t know the exact number of times a
code needs to be executed?

a. switch

b. while

c. for

d. if-else

4. Which of the given statements is true about XP?

a. XP narrows down towards a single project developed and numbered by a single team.

b. XP will not work in environment where the manager insists on complete documentation before
the team begins to code

c. XP will work in the environment where programmers are separated geographically.

d. XP is best suited to work with systems that have scalability issues.


5. testing is done by client in the real world environment.

a. Alpha

b. beta

c. system

d. gamma

6. Which two phases of feature driven development are repeated until no more feature exist?

a. Develop an overall model


b. Plan by feature
c. Design by feature
d. Build a feature list
e. Build by feature
a. b and c
b. c and e
c. b and e
d. d and b

7. Predict the output

What will be the output for the given code snippet

startprogram

public class Main {

public static void main(String[] args) {

try {

System.out.println(4/0);

try{

Int[] a={1,2,3};

System.out.println(a[3]);

} catch(ArrayIndexOutOfBoundsException e) {

System.out.println(“Out of bounds”);

}catch(ArthmeticException e){

System.out.println(“ArithmaticException : divide by 0”);

endprogram
a. out of bounds ArithmaticException : divide by 0

b. runtime error

c. out of bounds

d. ArithmaticException: divide by 0

8. Which of the following declarations will cause a compile time error?

a. int[] scores = null;

b. int[] scores =new int[5];

c. String[] nameArray = new String[10];

d. String[] nameArray = (5,3,2);

9. Arrow symbols in the flowchart is used to show the sequence of steps and the relationship
among them. State true and false

a. True

b. False

10. Information hiding is achieved through which OOP principle?

a. Inheritance

b. Encapsulation

c. Typing

d. Hierarchy

11. In multibranch, the pipeline names should not contain .

a. spaces

b. special characters

c. numerics

d. variables

12. Which are the phases of CI/CD pipeline?

a. Source

b. Operate

c. Monitor

d. Deploy
13. is a conceptual framework where software is developed is iterations

a. Agile

b. prototyping

c. extreme programming

d. DSDM

14. Predict the output of the following statement. Select substr(“Yellow is A colour”,1,5) from
dual;

a. Yellow

b. Yel

c. Yello
d. elow

15. column header is referred as

a. domain

b. attribute

c. table

d. tuples

16. At which level of testing the non-functional requirements are tested?

a. Unit testing

b. system testing

c. Integration testing

d. Acceptance testing

17. Agile methodology does not accepts change of requirements at any stage

a. True

b. False

18. In a relational database a referential integrity constraint can be done using

a. primary key

b. foreign key

c. secondary key

d. compose key
19. Which of the given options are true with respect to arrays?

a. Array size is fixed

b. The element of an array can be accessed using index.

c. Array element can be sorted by decreasing order

d. Negative values cannot be placed in an array.

20. Name the type of join used to include rows that do not have matching values

a. Cartesian product

b. inner join

c. non equi-join

d. outer join

21. Expand DSDM

a. Dynamic System Development Method

b. Dynamic State Development Method

c. Dynamic System Design Method

d. Data System Development Method

22. A primary key can have null values. State True and False.

a. True

b. False

23. Meta data is declared as in SQL?

a. Data Dictionary

b. Meta Dictionary

c. Meta Information

d. Data Information

24. Which of the following is true about Continuous Integration?

a. It is performed immediately after the developers check-in.

b. Development team sends continuous code merging requests even when the testing process is
running

c. It emphasis on the change in all stages of your production pipeline

d. It is an approach of testing each code to codebase automatically.


25. The practice of automatically provisioning a new environment at the time of deployment is
referred to as

a. Continuous Integration

b. Continuous Development

c. Infrastructure-as-Code

d. Configuration Management

26. Scrum divides the development into short cycles called .

a. Spirals

b. Tracks

c. Lanes

d. Sprints

26. Which of the following is a correct declaration in java?

a. char[] Tic = new char();

b. char[] Tic = new char[19];

c. char[] Tic = new char(14);

d. char[] Tic = new char[];

27. Raghav has developed an application to automate the billing process of the Aarvee
Departmental Store. When the product is in operation, the client found that the place of the phone
number, it prints the Customer ID. So he approaches Raghav to fix the issue. What type of
Maintenance does the above scenario depict?

a. Corrective

b. Adaptive

c. Predictive

d. Preventive

28. Consider the scenario: You have written a code to display a menu on the screen and some
operation are preformed based on the given user input. Which control structure would you use, so
that the menu is guaranteed to show/display at least once on the screen, before performing the
operation.

a. for loop

b. While loop

c. Do-While loop

d. Case
29. Predict the output for the given pseudo code snippet. SET count = 1

While count less than or equal to 5

Print “Hello, world”

Count = count + 1

END WHILE

a. Prints” Hello, world” 5 times

b. Prints “Hello, world” 6 times

c. loop goes on infinitely

d. Prints “Hello, world” 4 times

30. Pinky and Raju are working on an insurance project. They are not aware of SVN. So they created
a common project on the server. Both retrieved the project from the server. They made relevant
changes to the life. First Raju saved the changes to the server. Next Pinky saved her project identify
which of the given statements are true.

a. Both their changes get updated on the server.


b. Pinky’s changes alone are stored and when Raju tries the upload, the server notifies the
differences.

c. Both Pinky and Raju’s changes get rolled back.

d. Pinky’s project over writes the changes done by Raju.

31. Statement: For a logically cohesive module, there are some activities to be implemented. These
activities are preferred from inside the module itself.

Is the above given Statement true? If not, choose the correct option to make it true.

a. The activities are selected from outside the module.

b. The activities are selected in a random manner.

c. The activities are selected in a sorted manner.

d. The given statement is true.

32. does the special group or group 0 is included while coupling groups using the groupCount in
java.

a. True

b. False
33. Many are delivered in an agile process.

a. Builds

b. Software

c. Programs

d. Tests

34. Predict the output

startprogram

class Product

String productName;

class Mobile extends Product

String mobileName;

void display()

super.productName = mobileName + “Brand New !”;

System.out.println(mobileName +” “ + productName);

}
}
class Main

public Static void main(String args[])

Mobile obj = new Mobile();

obj.productName=”1”;

obj.mobileName=”2”;

obj.display();

endprogram
a. 2 2Brand New !
b. 1 2Brand New !
c. 1 1Brand New !
d. Brand New !

35. Predict the output

import java.util.Scanner;

class WeightLimitExceeded extends Exception {

WeightLimitExceeded(int x) {

System.out.print(Math.abs(15-x) + "kg: ");

public class Main{

void validWeight(int weight) throws WeightLimitExceeded {

if(weight > 15)

throw new WeightLimitExceeded(weight);

else

System.out.println("You are ready to fly!");


}

public static void main(String[] args)

Main ob = new Main();

Scanner in=new Scanner(System.in);

for(int i=0;i<2;i++) {

try {

ob.validWeight(in.nextInt());

catch(WeightLimitExceeded e)

System.out.println(e);

}
}

What will be the output for the given code snippet

a. 5kg : WeightLimitExceeded

You are ready to fly!

b. NumberFormatException
c. 5kg :

You are ready to fly!

d. Cannot find symbol Math.abs

36. Predict the output

What will be the output for the given code snippet

Startprogram

Public class Main{

public static void main(String args[])

try {

System.out.println(4 / 0);

try {

int[] a = {1,2,3};

System.out.println(a[3]);

} catch(ArrayIndexOutOfBoundsException e){

System.out.println(“Out of bounds”);

} catch (AritjmeticException e) {

System.out.println(“AritjmeticException : divide by 0”);

endprogram

a. Out of bounds AritjmeticException : divide by 0

b. Runtime error

c. Out of bounds

d. AritjmeticException : divide by 0
37. Predict the output

What will be the output for the given code snippet

startprogram

Public class Main{

public static void main(String args[])

int a =10;

for(int i=3;1>=0;1++)

try{

System.out.println(a / i);

System.out.println(“End of try”);

catch(ArithmaticException e) {

System.out.println(e);

endprogram

a. 3
5
10
Java.lang.ArithmeticException: / by zero
b. 3
End of try
5
End of try
10
End of try
Java.lang.ArithmeticException: / by zero

c. Compiletimeerror

d.runtimeerror

38. Predict the output

What will be the output for the given code snippet

Startprogram

Import java.util.regex;

Public class Main{

public static void main(String args[])


{

String s=”ABC”;

Pattern p=Pattern.compile(s);

String r=”ABCABCABCABC”;

Matcher m=p.matcher(r);

System.out.println(m.lookingAt());

endprogram

a. true

b. false

c. ABC

d. 0

39. Predict the output

What will be the output for the given code snippet

startprogram

Import java.util.regex;

Public class Main{

public static void main(String args[])

Pattern p=Pattern.compile(“\\d”);

String test=”India123”;

Matcher m=p.matcher(test);

If(m!null)

System.out.println(m.find());

System.out.println(m.matches());

endprogram

a. true
true

b. false

true

c. true

false

d. false

false

40. Predict the output

What will be the output for the given code snippet

startprogram

Public class Main{

public static void main(String args[])

int arr[] = new int[] {0,1,2,3,4,5,6,7,8,9};

int n=6;

n = arr[arr[n] / 2];

System.out.println(arr[n] / 2);

endprogram

a. 2

b. 1

c. 6

d. 0

41. Predict the output

public class Main{

public static void main(String args[])

int[]m = new int[13];

System.out.println("m[0] is " +m[0]);

}
}

(a.) Program has a compiler error

(b.) Program has a compiler error

(c.) The program runs fine and displays m[0] is 0.

(d.) None

42. Predict the output

import java.util.regex.*;

public class Hello {

public static void main(String args[])

String s="REGULAREXPRESSION";

String r="";

s=s.replaceAll(r,",");

System.out.println(s);

(a.) ,R,E,G,U,L,A,R,E,X,P,R,E,S,S,I,O,N,

(b.) REGULAREXPRESSION

(c.) None

(d.) All

43. Predict the output

import java.util.Scanner;

public class Main {

static void func(int a,int b) throws ArithmeticException, ArrayIndexOutOfBoundsException

System.out.println(10/a);

int[] arr={1,2,3};

System.out.println(arr[b]);

public static void main(String[] args)

{
Scanner in=new Scanner(System.in);

for(int i=0;i<3;i++)

try{

func(in.nextInt(),in.nextInt());

catch(ArithmeticException e){

System.out.println("can't divide by zero");

catch(ArrayIndexOutOfBoundsException e)

System.out.println("Out of bounds");

a) 5

can't divide by zero

out of bounds

b) 5

can't divide by zero

out of bounds

c) Compile TimeError

d) Results in recursion

44. Which plugin are the appropriate functionality plugins used in multibranch pipelines for
validating the pull or change requests. (Select any two)

*) GitHub Branch Source

*) GitHub Main Source


*) Bitbucket Branch Source

*) Bitbucket Main Source

45. In code phase, requirements and feedback are gathered from customers and stakeholders.

a) True

b) False

46. Agile is useful when the client requirements are not clear or requirement frequently changes.

a) True

b) False

47. Many are delivered in an agile process

a) Builds

b) Softwares

c) Programs

d) Tests

48. Assume we have created a table employees with the columns: employee_id, employee_name,
salary, designation and manager_id. Here employee_id is set as primary key and manager_id is a
foreign key which refers to employee_id in the employees. Manju wants to display the employee
details along with the manager id and manager name. Select which query suits the above
requirement.

a) select employee_id, employee_name, salary, employee_id "Mgr-id", employee_name "Mgr-


name" FROM employees;

b) select e.employee_id, e.employee_name, e.salary, m.employee_id "Mgr-id", m.employee_name


"Mgr-name" FROM employees e, employees m Where e.manager_id = m.manager_id;
c) select e.employee_id, e.employee_name, e.salary, m.employee_id "Mgr-id", m.employee_name
"Mgr-name" FROM employees e, employees m Where e.manager_id = m.employee_id;

d) select e.employee_id, e.employee_name, e.salary, m.manager_id "Mgr-id", m.employee_name


"Mgr-name" FROM employees e, employees m Where e.manager_id = m.employee_id;

49. Predict the output

What will be the output for the given code snippet

startprogram

import java.util.Scanner;

public class Main{


public static void throwit(){

System.out.println("throwit");

throw new RunTimeException();

public static void main(String[] args){

try{

System.out.println("Hello");

throwit();

}catch(Exception re){

System.out.println("Caught");

}finally{

System.out.println("Finally");

System.out.println("After");

a) Hello

throwit

Caught

Finally

After

b) Finally

After

c) CompileTimeError

d) throwit

Caught

After

Finally
1. Predict the output for the given pseudo code
snippetSET count = 1
WHILE count less than or equal
to 5print "Hello, world"
count = count+1
END WHILE
Prints “Hello, world” 5 times

2. At which level of testing the non functional requirements are tested?

System Testing

3. Consider a scenario: You have written a code to display a menu on the screen and some
operations areperformed based on the given user input. Which control structure would you use, so
that the menu is guaranteed to show display at least once on the screen, before performing the
operation.
Do-While

4. Which two phases of Feature Driven Development are repeated until no more features exixst?
a. Develop an overall Model
b. Plan By Feature

c. Design By Feature
d. Build a Features List
e. Build By Feature

5. What does public Boolean lookingAt() method do?

Attempts to match the pattern partially or fully in the matcher

6. A primary key can have NULL values. State True or False.


False

7. Name the type of join used to include rows that do not have matching values.
Outer Join
8. Meta data is described as in SQL?
Data Information

9. is a conceptual teamwork where software is developed in iterations


Agile

10. Many are delivered in an agile process


Builds

11. Expand DSDM


Dynamic System Development Method

12. Which of the following are features of BitBucket?


Code Review, Pipelines, Build Integrations, Jira Software Integrations, Trello Boards, Different
Views, Projects, IDE Integration
Trello Boards, Different Views

13. In Code Phase, requirements and feedback are gathered from customers and stakeholders

False

14. Which plugins are the appropriate functionally plugins used in multibranch pipelines for
validatingthe pull or charge requests
a. Github Branch Source
b. Github Main Source
c. BitBucket Branch Source
d. BitBucket Main Source

15. Predict the output


What will be the output for the given code snippet
startprogram
public class Main{
public static void main(String] args){
int a = 10;
for (int i=3; i>=0;i--)
try{
System.out.println(a/i);
System.out.printing ("End of try") ;
}
catch (ArithmeticException e) {
System.out.println(e);
}
}
}
endprogram

3
End of try
5
End of try
10
End of try
java.lang.Arithmetic Exception: / by zero

16. Predict the output


What will be the output for the given code snippet
startprogram

public class Main{


public static void main(String[] args){
int[] m = new int[13];
System.out.println("m[0] is “ +m[0]);
}
}
endprogram

Ans: 0

17. Predict the output


What will be the output for the given code snippet
startprogram
public class Main{
public static void main(String args[]) {
int arr[][] = new int[3][];
arr[0] = new int[1];
arr[1]= new int[2];
arr[2]= new int[3];
int sum = 0;
for(int i=0; i<3; ++i)
for(int j=0; j<i+1; ++j)
arr[i][j] = j+1;
for(int i=0; i<3; ++i)
for(int j=0; j<i+1; ++j)
sum += arr[i][j];
System.out.print(sum);

Ans: 10

18. Statement for a logically cohesive module, there are some activities to be implemented.
Theseactivities are performed from inside the module itself.
Is the above given statement true? If not, choose the correct option to make it true.
The activities are selected form outside the module

19. testing is done by the client in the real world environment.


Beta Testing

20. If you are asked to do a modular software design, which combination of coupling and cohesion
shouldyou use for designing the software?
High cohesion and low coupling

21. Which of the given statements is true about XP?

XP narrows down towards a single project, developed and maintained by a single team.
XP will not work in an environment where the manager insists on complete documentation
before the team begins to code.
XP will work in an environment where programmers are separated geographically.

22. Raghav has developed an application to automate the billing process of the Aarvee
Departmental store. When the product is in operation, the client found that in the place of
phone number, it prints the Customer ID.
What type of maintenance does the above scenario depict?
Corrective

23. Which one of the following is a correct declaration in Java?


Char[] Tic = new char[19];

24. Scrum divides the development into short cycles called


Sprints
25. Information hiding is achieved through which OOP principle ?
Encapsulation

26. Arrow symbols in the flowchart is used to show the sequence of steps and the relationship
amongthem. State True/Faise.
True

27. Does the special group and group 0 is included while capturing groups using the groupCount in
Java
False

28. Predict the output for the following statement. Select substr(‘Yellow is A Colour’,1,5) from …
Yello

29. Agile is useful when the client requirements are not clear or requirement frequently changes.
True

30. Which of the following declarations will cause a compile time error?
String[] nameArray = {5,3,2};

31. Which of these are not agile methodology?


BPM

32. Agile Technology does not accepts change of requirements at any stage.
False

33. In a relational database a referential integrity constraint can be done using


Foreign key

34. Which one is YAML’s basic building block?


Key Value

35. Which of the given options are true with respect to arrays?
The elements of an array can be accessed using index.
36. Pinky and Raju are working on an Insurance project. They are not aware of SVN. So they created
a common project on the server. Both retrieved the project from the server. They made relevant
changesto the file. First Raju saved the changes to the server. Next Pinky saved her project.
Identify which of the given statements are true.

Pinky’s project over writes the changes done by Raju.

37. Which kind of control structure is used when we don’t know the exact number of time when a
codeneed to be executed
While

38. The practice of automatically provisioning a new environment at the time of deployment is
referred toas
Infrastructure-as-Code(IaC)

39. College management is in need of the report of students exam result. For this Tom has to join
the tables students, courses, registration, exam, final_project. How many join conditions are
needed towrite the query.
Ans: 4

40. Predict the output of the below query. Select max(salary), min(salary), sum(salary), avg(salary)
fromemployee.
Will display the max, min, sum and average salary earned by the employee

41. In multibranch, the pipeline names should not contain


Spaces

42. Which of the following takes more


time?Design
Testing
Maintenance
Feasibility

43. Predict the output


What will be the output for the given code snippet
startprogram
import java.util. regex.*;
public class Main {
public static void main(String[]args){
Pattern p=Pattern.compile("\\d");
String test="India123";
Matcher m=p.matcher(test);
if(m!=null){
System.out.println(m.find());
System.out.println(m.matches());
}
}
}
Endprogram

True
False

44. Predict the output


What will be the output for the given code snippet
startprogram
public class Main {
public static void main(String args[]) {
int arr[] =new int[] {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
int n = 6;
n = arr[arr[n] / 2];
System.out.println(arr[n] / 2);
}
}
endprogram

Ans: 1

45. Predict the output


What will be the output for the given code snippet
startprogram
public class Main {
public static void main(String[] args) {
try{
System.out.println(4/0);
try{
int[] a = {1,2,3};
System.out.println(a[3]);

}catch (ArrayIndexOutOfBoundsException e){


System.out.println("Out of bounds");
}
}catch (ArithmeticException e){
System.out.println("ArithmeticException : divide by 0");
}
}
}
Endprogram

ArithmeticException : divide by 0
46. Predict the output
What will be the output for the given code snippet
startprogram
public class Main {
public static void main(String[] args) {
int[] m = new int[13];
System.out.println("m[0] is "+m[0]);
}
}
Endprogram

Ans: The program runs fine and displays m[0] is 0.

47. Predict the output


What will be the output for the given code snippet
startprogram
import java.util.regex.*;
public class Main {
public static void main(String[]args) {
String s = "ABC";
Pattern p = Pattern.compile(s);
String r = "ABCABCABCABC";
Matcher m = p.matcher(r);
System.out.println(m.lookingAt());
}
}
Endprogram

Ans: True

48. Predict the output


What will be the output for the given code snippet
startprogram
import java.util.regex.*;
public class Main {
public static void main(String[]args)
{
String s="REGULAREXPRESSION";
String =
s=s.replaceAll(r.".");
System.out.println(s);
}
}
Endprogram

Ans: ,R,E,G,U,L,A,R,E,X, P, R,E,S, S, I, O, N,


49. Predict the output
What will be the output for the given code snippet
startprogram
import java.util.regex.*;
public class Main {
public static void main(String[]args){
String s="India";
String r= "\\";
s=s.replaceAll(r,"a");
System.out.println(s);
}
}
Endprogram

Ans: PatternSyntaxException

You might also like