3i Infotech Placement: Sample Questions 912 - 913 of 1245

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 912

Appeared in Year: 2004

Question

MCQ▾

Which of the following JSP expressions are valid?

Choices

Choice (4)

a.

<% = “Sorry” + “for the” + “break” %>

b.

<% = “Sorry” ; %>

c.

<% = “Sorry” %>

d.

Both c. and a. are correct

Answer

d.

Explanation

  • Code placed within JSP expression tag is written to the output stream of the response.
  • So there is no need to write out. print () to write data.
  • The value of an expression inside JSP expression is converted to a String.
  • We can use an expression within a line of text, whether or not it is tagged with HTML, in a JSP file.
  • The expression element can contain any expression that is valid according to the Java Language Specification but we cannot use a semicolon to end an expression.

Syntax of JSP extension:

<% = Expression %>

Example:

  1. <html>
  2. <body>
  3. <%=”welcometojsp” %>
  4. </body>
  5. </html>
  • So, the correct answer is <% = “Sorry” + “for the” + “break” %> and <% = “Sorry” %> .

Question 913

Edit

Write in Short

Short Answer▾

Whether Linked List is linear or Non-linear data structure?

Explanation

  • According to access- listed list is a linear data structure.
  • According to storage linked list is a non-linear data structure as each node can be stored independently.

Linear Data Structure

  • Traverses the data elements sequentially, in which only one data element can directly be reached, Eg: Arrays, Linked Lists

Non-Linear Data Structure

  • Every data item is attached to several other data items that is specific for reflecting relationships.
  • The data items are not arranged in a sequential structure for example, Trees, Graphs

Developed by: