GNIIT SEM B MT1 EXAM QUESTION
1.Question–>Which of the following function used to specify the build version no. of the current scripting engine.?
Ans–> Script Build Version Engine.
2.Question–>Which of the following HTML is used to group line of text in web page.?
Ans–> <P>.
3.Question–>The previous field of the first value of a double link list contain?
Ans–>The address of null node.
The address of last node.
The address of itself node.
The address of the previous node.
4.Question–>Which of the following sorting algorithm is based on the divide and conquer approch.?
Ans–> Insertion Sort.
5.Question–>Sam creating–
1. Set Current = FRONT
2. Set FRONT = FRONT.NEXT
3.Release the memory.?
Ans–> 1.If FRONT = NULL.
a. Display “Queue is empty”.
b. Exit.
2. Set Current = FRONT
3. Set FRONT = FRONT.NEXT.
4. Release the memory for the node marked as current.
6.Question–>Which of the following Insert Operation on a Queue?
Ans–> 1. If the queue is empty:
a. Set FRONT = 0.
2.Increment REAR by 1.
3. Store the element at index position REAR in the array.
7.Question–>Which of the following Delete Operation on a Queue?
Ans–> 1. Retriveve the element at index FRONT.
2. Increment FRONT by 1.
8.Question–>Which of the following algorithm to find the inorder sucessor of a node in a thread binary tree.?
Ans–> 1.Identify the node for which you need to locate the inorder sucessor, and mark it
as currentNode.
2. If the right child of currentNode is a thread:
a. Mark the right child of currentNode as sucessor.
b. Exit.
3.Make currentNode point to its right child.
4. Repeat step 5 until the left of currentNode becomes a thread.
5. Make currentNode point to its left child.
6. Mark currentNode as sucessor.
9.Question–>Which of the following step for traversing a binary tree in the inorder sequence DHBEAFCIG.? A
/ \
Ans–> 1. Traverse the left subtree. B C
2. Visit the root. / \ / \
3. Traverse the right subtree. D E F G
\ /
H I
10. Question–>Which of the following step for traversing a binary tree in the preorder sequence ABDHECFGI.?
5
A
3/ \ 7
Ans–> 1. Visit the root. B C
2. Traverse the left subtree 1/ \ 4 6/ \ 9
3. Traverse the right subtree. D E F G
\ 2 8/
H I
11.Question–>Which of the following step for traversing a binary tree in the postorder sequence HDEBFIGCA.?
1
A
2/ \ 6
Ans–> 1.Traverse the left subtree. B C
2.Traverse the right subtree. 3/ \ 5 7/ \ 8
3. Visit the root. D E F G
\ 4 9/
H I
12.Question–>Which of the following algorithm for the PUSH operation.?
Ans–> 1. If top = Max – 1:
a. Display “Stack Full”
b. Exit
2. Increment top by 1
3. Store the value to be pushed at index top in the array
13.Question–>Which of the following algorithm for the POP operation.?
Ans–>1. If top = -1:
a. Display “Stack Empty”
b. Exit
2. Retrieve the value stored at index top
3. Decrement top by 1
14.Question–>Which of the following implement Algorithm DFS(v) using the stack of Traversing a Graph .?
Ans–> 1. Push the starting vertex, v into the stack.
2. Pop a vertex from the stack.
3. Visit the popped vertex.
4. Push all the unvisited vertices adjacent to the popped vertex into the stack.
15.Question–>Which of the following implement Algorithm BFS(v) using the Queue of Traversing a Graph .?
Ans–> 1. Visit the starting vertex, v and insert it into the queue.
2. Repeat step 3 until the queue become empty.
3. Deleting the front vertex from the queue, visit all its unvisited adjacent vertices,
and insert them into the queue.
16.Question–>Which of the following algorithm single starting vertex. Yoy can do this executing.?
Ans–> 1. Repeat step 2 for each vertex, v in the graph
2. If v is not visited:
a. Call DFS(v)
17.Question–>Which of the following Graph.?
5
(V1)———–>(V2)
| | \
3| 4 | \ 6
| | \
(V4)———->(V3)—->(V6)
\ 2 / 3
\ /
6 \ / 3
\ /
(V5)
Ans–>Weight Graph
18.Question–>Which of the Linear search algorithm for an employee ID in an array?
Ans–>1. Read the employee ID to be searched
2. Set i = 0
3. Repeat step 4 until i > n or arr[i] = employee ID
4. Increment i by 1
5. If i > n:
Display “Not Fount”
Else
Display “Found”
19.Question–>Which of the following algorithm to be searched for a desired element by using binary searched.?
Ans–>1. Accept the element to be searched
2. Set lowerbound = 0
3. Set upperbound = n – 1
4. Set mid = (lowerbound + upperbound)/2
5. If arr[mid] = desired element:
a. Display ” Found”
b. Go to step 10
6. If desired element < arr[mid]:
a. Set upperbound = mid – 1
7. If desired element > arr[mid]:
a. Set lowerbound = mid + 1
8. If lowerbound <= upperbound:
a. Go to step 4
9. Display “Not found”
10. Exit.
20.Question–> Which of the following algorithm to sort the list by using the insertion
sort.?
Ans–> 1. Repeat step 2, 3, 4, and 5 varying i from 1 to n – 1
2. Set temp = arr[i]
3. Set j = i – 1
4. Repeat until j becomes less than o or arr[i] become less than or equal to temp:
a. Shift the value at index j to index j + 1
b. Decrement j by 1
5. Store temp at index j + 1
21.Question–> Which of the following algorithm to sort the list by using the bubble
sort.?
Ans–>1. Set pass = 1.
2. Repeat step 3 varying j from 0 to n – 1 – pass.
3. If the element at index j is greater than the element at index j + 1, swap the
two elements.
4. Increment pass by 1.
5. If pass <= n – 1 go step 2.
22.Question–>Yoy are sorting a list using shell sort serveral distance poaition.?
Ans–> Shell sort.
23.Question–>Which of the following statement is not true about hasing.?
Ans–> Hasing function.
24.Question–> You are creating a first n natural no. which of the following factorial algorithm reprents the correct recursive function to solve he probem.?
Ans–>1. If n = o, then:
a. Return(1)
2. Rturn (n *Factorial(n – 1))
25.Question–>Which of the following CANNOT be a static data structure?
Ans–>Linked list.
26.Question–>Which of the following CANNOT be a dynamic data structure?
Ans–> Arrary
27.Question–>Which of the insert value 55 in a height balanced tree and restore its balanced whenever required?
Ans–>A double rotation is required to restore the balance.
28.Question–>Which of the type of a graph has an ordered pair of vertices?
Ans–> Directed graph.
29.Question–>Which of the following algorithm, worst by selecting element from the list for a pivot and the partision the list into two parts the may or may not be equal?
Ans–>Quick sort.
30.Question–>Which of the following reffred to the tecnick of defing in process in terms of its self?
Ans–> Recursion.
31.Which of the following used for storing the keystrokes as you type on a keyboard?
Ans–> Keyboard buffering.
32.Question–>Which of the involves dividing the key value by the hash table to obtain the remainder of the division as the address of the record corresponding to the key value?
Ans–>Modular mathod.
33.Question–>Which of the following mid square the key, and then take some digit from the middle of the number as an address of the corresponding key?
Ans–>Mid Square method.
34.Question–>Which of the following first duivide the keys into parts and then add and them?
Ans–>Folding mehod
35.30.Question–>Which of the following storage area is divide into parts, the prime area and overflow area?
Ans–> Coalesced chaining.
36.Question–>Which of the following option is the correct code snipped to add a row in a table with the border of with 5 pixels?
Ans–> <TABLE WIDTH = “5”>
<TR><TD> Joe </TD><TD> martin </TD>
</TR>
</TABLE>
37.Question–>Which of the following implemented linear order of the group?
Ans–>0(1)
38.Question–>Identy the correct sequence of steps required to display a website?
Ans–> 1. Register an account with the internet service.
2. Register a domain name.
3. Choose the services.
4. Upload the files on the web server.
5. Test the website.
39.Question–>Which of the following searches for the specified element at any node level.?
Ans–> // PRODUCTNAME
40.Question–>Which of the following select the PRODUCTNAME element, which exists within the parent of the corrent element?
Ans–> .. /PRODUCTNAME
41.Question–>Which of the following select the immediate child elements of PRODUCTDATA. If this operator occur at the start of the pattern, the child elements should be selected from the root node?
Ans–> / PRODUCTDATA
42.Question–>Which of the following Returns the largest integer that is less than or equal to the argument?
Ans–> floor(num).
43.Question–>Which of the following Returns the smallest integer that is less than or equal to the argument?
Ans–> celing(num)
44.Question–>Which of the following returns the sum of the all nodes in the node-set that is passed as the argument?
Ans–> sum(ns)
45.Question–>Which of the represents a time duration that recurse after a specific intervel.?
Ans–> recrringDuration
46.Question–>Which of the represents an instance of time that recurs every day?
Ans–>time.
45.Question–>Which of the represents certain duration of time?
Ans–> timeDuration.
47.Question–>Which of the following derived from the atomic and list data types?
Ans–> Union data type.
48.Question–> yoy wants to create an attribute name PRODID?
Ans–> <xsdf:attribute name=”PRODID” type= “pID” use=”required”/>
49.Question–> Joe has created the following XSD schema a to declare the resuable data types that store product ID and order ID type which of the correct code resuable?
Ans–> <schema xmlns=”http://www.w3.org/2001/XMLSchema”
targetNamespace=”www.ecomatcybershop.com/purchase”>
<simpleType name=”prstring”>
<restriction base=”string”>
<pattern value=”[P] {1}\d{3}”/>
</restriction>
</simpleType>
<simpleType name=”orstring”>
<restriction base=”string”>
<pattern value=”[o] {1}\d{3}”/>
</restriction>
</simpleType>
</schema>
50. Question–> You need to create another XML schema to declare the elements and attributes used to store the purchase order.this schema should contain a reffrence to the schema specified in tototype.xsd in order to be able to use the data type declared in that schema?
Ans–> <schema xmlns=”http://www.w3.org/2001/XMLSchema”
targetNamespace=”www.ecomatcybershop.com/purchase”
xmlns:prd=”ecomatcybershop.com/purchase”>
<include schemaLocation=”potype.xsd”/>
<element Name=”PURCHASEORDER” type=”prd:purord”/>
<complexType name=”purord”>
<sequence>
<element name=”ORDER” type=”prd:ord”/>
</sequence>
<attribute name=”PRODID” type=”prd:prstring”/>
<attribute name=”ORDERID” type=”prd:orstring” use =”required”/>
</compexType>
<complexType name=”ord”>
<sequence>
:
:
</sequence>
</complexType>
</schema>
52.Question–> Which of the following algorithm that attempts to find the sum of the first n natural numbers?
Ans–> 1. If (n = 1)
Return(1)
2. s = n + Sum(n – 1)
3. Return(s)
53.Question–> Who can search for sorting algorithm?
Ans–> Binary search.
54.Question–> Which of the following linear algorithm has quardratic order of growth?
Ans–>O(n2).
55.Question–> Which of the following used as a parent for the TR and TD elements.?
Ans–>TBODY.
56.Question–> Which of the following used to represent a row in a table container for theTH and TD elements?
Ans–> TR.
57.Question–> Which of the following used to add column headings?
Ans–> TH.
58.Question–> Which of the following used to specify headings for table?
Ans–>THEAD.
59.Question–> Which of the following top-level object in aa XML DOM?
Ans–> Document object.
60.Question–> You can provides the list of nodes present in an XML document for manipulation?
Ans–> NodeList object.
61.Question–>Which of the list inserted and deleted first-in-first out(FIFO)?
Ans–> Queue.
62.Question–>Which of the algorithem for heap tree?
Ans–> 1. Set last = n-1.
2. Convert the list arr[0] to arr[last] into a heap.
3. Swap arr[0] with arr[last].
4. Decrement last by 1.
5. If last>0, go to step 2.
63.Question–> Which of the following statement true about XML namespace?
Ans–> xmlns.
64.Question–> Which of the following creating style sheet product details PRODUCTID,PRODUCTNAME, and PRICE have to be stored in the order of the PRODID attribute. which of the correct code?
Ans–> <xsl:stylesheet xmlns:xsl=”http://www.w3.org/1999/XSL/Transform”
version=”1.0″>
<xsl:template match=” / “>
<xsl:for-each select=”PRODUCTDATA / PRODUCT”>
<xsl:sort select=”@PRODID” order=”ascending”/>
<LI>
<xsl:text>product ID: </xsl:text>
<font color=”red”><xsl:value-of select=”@PRODID”/>
</font>
<xsl:text>product Name: </xsl:text>
<font color=”red”><xsl:apply-templates select=”PRODUCTNAME”/>
</font>
<xsl:text> Price Per Unit (In U.s. $): </xsl:text>
<font color=”red”><xsl:value-of select=”PRICE”/>
</font>
</LI>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
65.Question–> Which of the following code to associate the XML document with the schema specified by user code script:
var namespace=xmlDoc.documentElement.namespaceURI;
xmlDoc.ValidateOnParse=true;
xml xsdschemacache = new ActivXObject(“Maxm12.XMLSchemaCache.6.0″);
xsdschemacache.add(namespace,document.frmTransform.TxtXSDFileName.value);
xmlDoc.schema=xsdSchemacache;
xmlDoc.load (document.frmTransform.TXTFileName.value);
?
Ans–>add
No comments:
Post a Comment