Showing posts with label OLD PAPERS. Show all posts
Showing posts with label OLD PAPERS. Show all posts

MGT402 – Cost & Management Accounting Online Quiz # 2


MGT402 – Cost & Management Accounting

Online Quiz # 2
January 05, 2010

Total Questions: 15

If you find any incorrect answer, kindly let everyone know about it.

Question # 1 of 15 ( Start time: 03:44:00 AM )
Which of the following is a point of differentiation between blanket rates and department rates?
Select correct option:

Blanket rate is a single overhead rate established for the entire factory

Department rates are separate overhead rates for all departments of factory through which the products pass

Department rate is a single overhead rate established for the entire factory

Blanket rates are separate overhead rates for all departments of factory through which the product passes

(I'm not 100% sure about this question, I selected option # 1, kindly see handouts, page # 105(pdf file))



Question # 2 of 15 ( Start time: 03:45:19 AM ) Total Marks: 1
Production volume of 1,200 units cost incurred Rs. 10,000 and production volume of 1,400 units cost incurred Rs.20, 000. The variable cost per unit would be?
Select correct option:

Rs. 50.00 per unit

Rs. 8.33 per unit

Rs. 14.20 per unit

Rs. 100 per unit

(I got confused in this question, what I'm getting:
variable cost per unit = total variable cost/total number of units produced

one solution could be;
in producing 1200 units, total cost incurred was 10000, and
in producing 1400 units, total cost incurred was 20000

1400 - 1200 = 200 units
20000 - 10000 = 10000 cost

MGT602 Midterm Subjective Solved from Past Papers


MGT602= t Midterm Subjective Solved from Past Papers

By::: YASIR JAVAED

Characteristics of searching an outside partner. (3 Marks)
Following are a few things that one always tries to search in their partner and which not only makes a great partner but also are the characteristics of a great relationship.
· Someone who is caring and honest.
· Someone who is open and responsive and with whom you can confide in like a friend.
· Someone who is trustworthy and who will risk his/her life for you

What is Business Plan. (3 Marks)
A business plan is a written document prepared by the entrepreneur that describes all the relevant external and internal elements involved in starting a new venture. It addresses both short- and long-term decision making. The business plan is like a road map for the business’ development. The Internet also provides outlines for business planning.

Why business plan is significant. (5 Marks)
Business plan is significant because, in running or starting a business, the learning curve is short before you run out of resources and are forced to close. Therefore, a business plan helps you set up a sound framework, model and system ahead of time, as well as, treat potential problems and threats, so that you can capably run a business. A funding business plan will save you a lot of time and money. The beautiful thing about a business plan is that it actually creates the future of your business, as you want it to be. It gives you more control over what future success will come. More importantly, it gives you a great process to grow the future business you desire, whether that is a start up, acquisition, expansion or build out.

How present business plan to potential investor
It is often necessary for an entrepreneur to orally present the business plan to investors.
Typically the entrepreneur provides a short (20-30 minutes) presentation of the business plan. The entrepreneur must sell their business concept in a short time period. A venture capitalist or angel group may also ask the entrepreneur to present the plan to their partners before making a final decision.

Strategic issues in international entrepreneurship
Strategic Issues to Consider:
1. Is rapid entry into the market needed?
2. Will joint venture result in obtaining a competitive advantage?
3. The allocation of responsibility between the U.S. and the foreign operation.
4. Would the joint venture lower the chances of expropriation (mining ventures)?
5. What’s the degree of standardization possible?

What will your strategic planning while enter international market
When you decide to enter into the international market you should keep few things in mind. When you decide to enter into the international market you should change your mindset. Each and every country has its own tradition and culture. The same product, brand name and marketing campaign are not sufficient to introduce your business to other countries. You have to know about the country and the requirements specific to the nation. The important thing that is required is the research about the country you are trying to expose your business into. Study the culture, requirements and the market for your product. Learn about the international policies of the country to avoid legal problems later. Talk more about your international marketing strategy to friends and relatives living in other countries. As you spend more of your time in doing this research you will be able to get a clear idea of what people in other countries want from you. It is important that you have to build a trust among the people about your product

Cs301 MIDTERM EXAMINATION 2011 (MAY)


MIDTERM EXAMINATION 2011 (MAY)

1. What is function of length () method in the Queue
Answer: (page 111)
In Queue length() method, has a single statement i.e.
return size ;
This method returns the size of the queue, reflecting the number of elements in the queue. It is not the size of the array used internally to store the elements of the queue.

2. Explain the two cases in which we apply double rotation in An Avl tree
Answer: (Page 229)
Sometimes a single rotation is not sufficient to balance an unbalanced tree.
The two cases are following:
1.   Insertion into the right subtree of the left child of X node (RL)
2.   Insertion into the left subtree of the right child of X node (LR)

3. How can we perform level-order traversal on a tree? Answer:- (For More detail and code see Page 161 )
We can print a binary tree level by level by employing recursive or non-recursive method.
The idea of a level-order traversal is to visit the root, then visit all nodes "1 level away" (depth 2) from the root (left to right), then all nodes "2 levels away" (depth 3) from the root, etc. For the example tree, the goal is to visit the nodes in the following order:






A level-order traversal requires using a queue (rather than a recursive algorithm, which implicitly uses a stack). A queue is a FIFO structure, which can make the level-order traversal easier.



4. How can the dangling reference problem be avoided? Answer:- ( Page 200 )
To avoid dangling reference, don’t return the reference of a local variable (transient) from a function.

         

IT430 old past paper

IT430 MIDTERM SUBJECTIVE QUESTIONS




Question No: 18 ( Marks: 1 )
What tag is used for displaying a border between the frames?
- BORDER or FRAMEBORDER – Set this attribute to 0 for not displaying a border between the frames
Question No: 19 ( Marks: 2 )
Suppose, there is an applet at "http://www.vu.edu.pk/demo.class". Write the code to include this applet in your web page.


<HTML> <BODY>
<APPLET CODE= "http://www.vu.edu.pk/demo.class". width=100
height=200>DEMO</APPLET>
</BODY> </HTML>


Question No: 20 ( Marks: 3 )
Identify the object, property and method in the following: Math.sin(45)
Math.PI


document.write("Math.sin(45) :"+Math.sin(45)+"<P>");
document.write("Math.PI :" +Math.PI +"<P>");


Question No: 21 ( Marks: 5 )
What is a web form? What is its usage in reference to client-server communication? 2+3




A webform on a web page allows a user to enter data that is sent to a server for processing. Webforms resemble paper forms because internet users fill out the forms using checkboxes, radio buttons, or text fields.


You are now familiar with the fact that internet presents a two-way communication model, also called theClient-Server Model. In the client server model some data is processed on the client side and certain data is processed by the server on the server side.








Question No: 22 ( Marks: 10 )
Explain the following frame tags? Discuss the usage of these


a) <frameset>
b) <frame>
c) <Noframes>
d) <Iframe>






Question No: 17 ( Marks: 1 )
What are the two types of twisted pair cables for networking ?


Question No: 18 ( Marks: 1 ) What it stands for IIS?


Question No: 19 ( Marks: 2 )
When does we use the parseFloat() function?


Question No: 20 ( Marks: 3 )
Name the JavaScript function that convert strings to float numbers. How do you give the function a string value to convert to a number?


Question No: 21 ( Marks: 5 )
Write your personal profile in a file saving it with the extension of e.g. “abc.js”and then call it in a JavaScript code.






Question No: 22 ( Marks: 10 )
Explain any three of the outside attacks briefly.






PAPER#1 multiple choices 18 all from past papers
2 short question 2 marks
2 short question 3 marks
2 questions 5 marks


total marks 38
Q:
1. difference between sniffing and IP adress spoofing?
2. tools to develop web server.?
3. write XML code of " welcome to virtual university" "of pakistan" to " IT430 students"
4. write java script code or variables and also show in alert box var 13.6
var 20.5
5. why used list in HTML?
6. briefly explain different terms virus
worms back door Trojan horses


PAPER#2
Total question 23


16 question of 01 number (objective)


03 question of 02 numbers (subjective)


02 question of 03 numbers


02 question of 05 numbers


70% quiz from old papers


Objective


1-advantage of virtual private network (2)


2-how can we prevent our computer from virus attack (5) (virus protection page no 94)


3-what SQL stand for and its usage (2)


4(write html code for making borders which align left border color green.(5)


5-what is the function of reset button and submit button.


6-one more question about html about the functions of the tags (5)


PAPER#3


Total questions (23) MCQS (16) Marks 1
Short Questions (3) Marks 2
Short Questions (2) Marks 3
SubJ Questions (2 Marks 5


Total Marks = 38
Long questions


Question 1


Why * is used in SQL Question 2
Explain what will be displayed after this program is run and briefly explain what is the purpose of
HIDDEN


<FORM NAME="Form1"> <INPUT TYPE= "HIDDEN" NAME= "Shirt1"
VALUE="25"> <INPUT


TYPE= "CHECKBOX" NAME= "Check1">Blue Cotton Shirt <br>
<INPUT
TYPE= "HIDDEN"


NAME= "Shirt2" VALUE="26"> <INPUT TYPE= "CHECKBOX" NAME= "Check2"
>Green Cotton


Shirt <br>


<INPUT TYPE= "HIDDEN" NAME= "Shirt3" VALUE="27"> <INPUT TYPE= "CHECKBOX"


NAME= "Check3">White Silk Shirt ….


<P>


<INPUT TYPE="submit" NAME="Go" VALUE="Register!"> <INPUT TYPE="RESET"


VALUE="Reset!"></FORM> Question 3






How to evaluate the performance of web server


60% mcqs were from the past papers


PAPER#4
differ virus and worms 5marks
coding of mydate after seven days change 5 marks relational simply or flat and provide two file. 3 marks coding of alert massage 3marks
arry is a varible are not discuss 2marks one of two name of network


PAPER#5
1- web server 2
2- "target" attribute not used in frames. justify 2
3- xml coding karni thi question yad nai 5
4- "form" tag ki coding ki translation karni thi 5
5- position properties in style sheet 3






PAPER#6
Question No.17: What will be the final value of variable ‘a’ at the end:
(Marks: 2)
Var a = 4; Var b = 5; Var c =10; a = a+c=6;
Question No.18: What is meant by “Catalog Display” and why it Use? (Marks: 2)
Question No.19: Create text bob in HTML, having length “15”, containing text “IT430”? (Marks: 2)
Question No.20: Write XML code to print greeting “Welcome to
XML!” from “Virtual University of Pakistan” to “IT430 Students”? (Marks: 3)
Question No.21: How can you minimize the risk of outside attacks on
Network? (Marks: 3)
Question No.22: How can we differentiate between Server Side
Processing & Client Side Processing? Give at least one example? (Marks: 5)
Question No.23: Given the following JavaScript Codes :- (Marks: 5) Str = new String (“Welcome to Virtual University of Pakistan”); StrArray = New Array (10);
StrArray = str.split (‘ ’);
a) What will be the output of the following function?
i) str.charAt (5)
ii) str.Substring (8, 13)
b) What will be the value of strArray [1] ?






PAPER#7
Today is my IT430 paper quite tough laga muja


Check it


1. At the end of all process what will be variable t contain


Var S1=”made” Var S2=”U”
Var S3=”and me”


t =Si+”4”+S2+S3 2marks


2. Suppose there is applet at “http//www.vu.edu.pk/demo.class”
write code to include this applet in your browser page 2marks


3. How would you change a date “MyDate” to one week later?
3marks


4. Note on Application Gate way firewalls. 3marks


5. Essential feature of E-commerce software 5marks


6. Write HTML for Input field, reset button and submit button
5marks








1. What is usage of <title> tag in a web page? Marks 2
2. How are public and private keys used in public by cryptography? Marks 2
3. We want to create left margin of 10 pixels and right margin of 15 pixels. Write
CSS code to apply both properties. Marks 3
4. Write a JavaScript code to change a date”my date” to one week later? Marks 3
5. How can you differentiate among different malicious program, like backdoors and
Trojan Horses viruses and worms? Marks5
6. Identify the following variables as valid or invalid. Also give reasons. Marks 5


Question No: 17 ( Marks: 1 ) What it stands for (W3C)? Answer
World Wide Web Consortium


Question No: 18 ( Marks: 1 )
Do you agree or not that using Cascading Style Sheets one can apply an image to sections of one’s page or even to individual words.


Question No: 19 ( Marks: 2 )
Which attribute is used to describe , how many times you want the sound to repeat. Discuss briefly.


Question No: 20 ( Marks: 3 )
What are cookies? Why these are used in web development?


Question No: 21 ( Marks: 5 )
What is the difference between physical address and logical address? Support your answer with
at least two examples.


Question No: 22 ( Marks: 10 )
How can we change a Font style of a text? Write complete tag by using an example by yourself.


Question No: 17 ( Marks: 1 )
What does this mean?
padding-right






Question No: 18 ( Marks: 1 )
Do you agree or not that using Cascading Style Sheets one can apply an image to sections of one’s page or even to individual words.






Question No: 19 ( Marks: 2 )
Suppose, there is an applet at "http://www.vu.edu.pk/demo.class". Write the code to include this applet in your web page.
<APPLET CODE= “http://www.vu.edu.pk/demo.class” width=100 height=200> DEMO
</APPLET>
Question No: 20 ( Marks: 3 )
What do you think, is there any difference between Static and Dynamic IP Address assignment? Discuss.


Question No: 21 ( Marks: 5 )
What is cryptography? What techniques are used for cryptography?


Question No: 22 ( Marks: 10 )
Analyze the following given code showing some Cascading Style Sheets tags and explain its lines one by one.


<html>


<head>


<style type="text/css">


h1 {text-decoration: overline}


h2 {text-decoration: line-through}


h3 {text-decoration: underline}


a {text-decoration: none}


</style>


</head>








<body>


<h1>This is header 1</h1>


<h2>This is header 2</h2>


<h3>This is header 3</h3>


<p><a href="http://www.vumba2009.blogspot.com/default.asp">This is a link</a></p>


</body>








</html>


Question No: 21 ( Marks: 2 )
How
Certification Authority (CA) issues the certificates? Describe briefly
Question No: 22 ( Marks: 2 )
Discuss the role of child element tags while in writing XML code. Question No: 23 ( Marks: 3 )
Performance of web servers can be evaluated mainly on the basis of two factors. What are they?
Question No: 24 ( Marks: 3 )
Write a function for the addition of two numbers? Question No: 25 ( Marks: 5 )
Write the JavaScript code which will display the following in a web page
using a FOR loop:






The number is 0
The number is 1
The number is 2
The number is 3
The number is 4
The number is 5
Question No: 26 ( Marks: 5 )
What is the difference between an interpreted and a compiled language? Give one example of
each.

CS301- Data Structures SOLVED MIDTERM PAPERS

CS301- Data Structures

SOLVED MCQS & SUBJECTIVE FROM MIDTERM PAPERS




Question: ( Marks: 1 ) - Please choose one

In a complete binary tree of depth 5 the number of non-leaf nodes is

15
32
16

    31                      

Question: ( Marks: 1 ) - Please choose one

Which of the following is NOT a linear data structure?

     Linked List
     Stack
     Queue
      Tree   (page 121)



Recursive function calls are implemented internally using a data structure

     Stack
     Link-List
      Tree
Queue




Question No: 1 ( Marks: 1 ) - Please choose one
A queue where the de-queue operation depends not on FIFO, is called a priority queue
Ø  ► False


Ø  ► True Page101


Question No: 2 ( Marks: 1 ) - Please choose one
The data of the problem is of 2GB and the hard disk is of 1GB capacity, to solve this problem we should


► Use better data structures
► Increase the hard disk space (Page 5)
► Use the better algorithm
► Use as much data as we can store on the hard disk



Question No: 3 ( Marks: 1 ) - Please choose one
Consider the function X as under int X (int& Value)
{
return Value;
}
Now a and b are integers in a calling function. Which one of the following is a valid call to the above function
X.
► a = X (b) ;
► a = X (&b) ;
► a = X (*b) ;
► None of the given options
Here function argument passing by reference method is used, so when we call a function we will give the variable reference as parameter.




CS301 Data Structures MIDTERM EXAMINATION Spring 2010


MIDTERM EXAMINATION Spring 2010
1. Addition of new items in stack make the pointer ------------ by 2
a. Increment, bits
b. Increment, bytes c. Decrement, bits
d. Decrement, bytes Click here for detail




2. Next item in a linked list is known as a. Index
b. Item
c. Node Click here for detail
d. Child




3. What will be the postfix notation of 5+6/2. a. 56+/2
b. 562+/
c. 562/+(Page 66)
d. 5+62/




4. In an AVL tree to delete a parent with two childs in a straight line following rotations will be required:- a. Single
b. Double
c. Triple d. None.


5. To check the depth of an AVL tree following time will be taken:- a. 1.66 Log2n
b. 1.44 Log2n (Page 227)
c. Log2 (n+1)-1
d. 1.66 Log2n (n+1)




6. BST is a Structure:- a. Linear
b. Non Linear Click here for detail
c. Circular
d. None of Above









7. After creation of an array:-
a. Size can be increase but can not be decreased. b. Size can be decreased but can not be increased.
c. Size can neither be increased nor be decreased. Click here for detail
d. Size can be increased and can also be decreased.




8. Each node in a BST has Pointers:- a. 1
b. 2 Click here for detail
c. 3 d. 4



9. Highest Operators Precedence is of the following operator:- a. Plus
b. Minus
c. MultiplyClick here for detail
d. Exponentiation




10. Following are the linear data structures:- a. Stacks
b. Queues
c. Both a & b (Page 52, 87)
d. None of the above




11. Each entry which points to a null value in a Singly Linked List is known as:- a. Node
b. First Node c. Last Node d. Head Node






12. Non recursive calls are faster than the Recursive calls.
a. True (Page 323)
b. False




13. Tree data structure is a a. Linear
b. Non Linear (Page 112)
c. Circular
d. None of Above








14. What will be the valid postfix notation of A+B*C-D
a. ABC+*D-
b. ABC*+D- (According to rule)
c. ABCD+-*
d. AB+D*C






15. When an operator is used in between two operands this is which type of notation a. Prefix
b. Postfix
c. Infix (Page 64)
d. None of the Above



Question No: 1 ( Marks: 1 ) - Please choose one
Which one of the following is a valid postfix expression?
► ab+c*d-
► abc*+d- (According to rule)
► abc+*d-
► (abc*)+d-




Question No: 2 ( Marks: 1 ) - Please choose one
The tree data structure is a
► Linear data structure
► Non-linear data structure (Page 112)
► Graphical data structure
► Data structure like queue




Question No: 3 ( Marks: 1 ) - Please choose one
A Compound Data Structure is the data structure which can have multiple data items of same type or of different types. Which of the following can be considered compound data structure?
► Arrays Click here for detail
► LinkLists
► Binary Search Trees
► All of the given options




Question No: 4 ( Marks: 1 ) - Please choose one
Suppose a pointer has been declared in main but has not assigned any variable address then
►That pointer points to First byte in main function
►That pointer contains a NULL value
►None of these
►That pointer points to any memory address






Question No: 5 ( Marks: 1 ) - Please choose one
Here is the start of a C++ class declaration:
class foo
{
public:
void x(foo f);
void y(const foo f);
void z(foo f) const;
...
Which of the three member functions can alter the PRIVATE member variables of the foo object that activates the function?
►Only x can alter the private member variables of the object that activates the function.
►Only y can alter the private member variables of the object that activates the function.
►Only z can alter the private member variables of the object that activates the function.



►Two of the functions can alter the private member variables of the object that activates the function. Only the x and y can alter the private member variable of the foo class object. Last Option is more correct but not exact. In the last option the two function name are not mentioned


Question No: 6 ( Marks: 1 ) - Please choose one
The operation for removing an entry from a stack is traditionally called:
► delete
► peek
► pop (Page 53)
► remove




Question No: 7 ( Marks: 1 ) - Please choose one
Which statement of the following statements is incorrect?
► Lists can be implemented by using arrays or linked lists
► A list is a sequence of one or more data items
► Stack is a special kind of list in which all insertions and deletions take place at one end
► Stacks are easier to implement than lists




Question No: 8 ( Marks: 1 ) - Please choose one
Parameters in function call are passed using,
► Stack (Page 80)
► Queue
► Binary Search Tree
► AVL Tree




Question No: 9 ( Marks: 1 ) - Please choose one
Consider the following sequence of push operations in a stack:
stack.push(’7’); stack.push(’8’); stack.push(’9’); stack.push(’10’); stack.push(’11’); stack.push(’12’);
►7 8 9 10 11 12
►9 8 11 10 7 12
►9 10 8 11 12 7
►9 10 8 12 7 11








Question No: 10 ( Marks: 1 ) - Please choose one
What is the maximum depth of recursive calls a function may make?
►1
►2
► n (where n is the argument)
► There is no fixed maximum



Question No: 11 ( Marks: 1 ) - Please choose one
Consider the following function:
void test_a(int n)
{
cout << n << " ";
if (n>0)
test_a(n-2);
}
What is printed by the call test_a(4)?
►420
►024
►02
►24




Question No: 12 ( Marks: 1 ) - Please choose one
Queue follows,
► Last in First out
► First in Last out
► First in First out(Page 87)
► None of these




Question No: 13 ( Marks: 1 ) - Please choose one
is a binary tree where every node has a value, every node's left subtree contains only values less than or equal to the
node's value, and every node's right subtree contains only values that are greater then or equal ?
►Strictly Binary Tree
►Binary Search tree Click here for detail
►AVL tree
►All of these




Question No: 14 ( Marks: 1 ) - Please choose one
Four statements about trees are below. Three of them are correct. Which one is INCORRECT?
►Trees are recursively defined multi-dimensional data structures Click here for detail
►The order of a tree indicates a maximum number of childen allowed at each node of the tree
►A search tree is a special type of tree where all values (i.e. keys) are ordered
►If Tree1's size is greater than Tree2's size, then the height of Tree1 must also be greater than
Tree2's height.




Question No: 15 ( Marks: 1 ) - Please choose one
Below is a binary search tree. If we delete the value 50 using the algorithm we discussed, what value will be in the
root of the remaining tree?
► 50
► 60
► 70
► 80



Question No: 16 ( Marks: 1 ) - Please choose one
Is a data structure that can grow easily dynamically at run time without having to copy existing elements?
► Array
► List
► Both of these
► None of these














Question No: 1 ( Marks: 1 ) - Please choose one
Which one of the following statement is NOT correct .
► In linked list the elements are necessarily to be contiguous Click here for detail
► In linked list the elements may locate at far positions in the memory
► In linked list each element also has the address of the element next to it
► In an array the elements are contiguous




Question No: 2 ( Marks: 1 ) - Please choose one
In a program a reference variable, say x, can be declared as
► int &x ; Click here for detail
► int *x ;
► int x ;
► None of the given options




Question No: 3 ( Marks: 1 ) - Please choose one
Linked lists are collections of data items "lined up in a row" , insertions and deletions can be made only at the front and the back of a linked list.
► True
► False Click here for detail






Question No: 4 ( Marks: 1 ) - Please choose one
A Linear Data Structure is the data structure in which data elements are arranged in a sequence or a linear list. Which of the following is Non Linear Data Structure?
► Arrays
► LinkLists
► Binary Search Trees Click here for detail
► None of these






Question No: 5 ( Marks: 1 ) - Please choose one
A queue where the de-queue operation depends not on FIFO, is called a priority queue
False
►True (Page 101)



Question No: 6 ( Marks: 1 ) - Please choose one
Which one of the following statements is correct?
► size is fixed once it is created Click here for detail
► Link List size is fixed once it is created.
►Binary Search Tree size is fixed once it is created
► AVL Tree size is fixed once it is created




Question No: 7 ( Marks: 1 ) - Please choose one
Which one of the following is correct about pointers?
►They always point to different memory locations
►They may point to a single memory location
►The address of two pointer variables is same
► None of these






Question No: 8 ( Marks: 1 ) - Please choose one
Which of the following abstract data types are NOT used by Integer Abstract Data type group?
►
►Int
►float Click here for detail
►long






Question No: 9 ( Marks: 1 ) - Please choose one
The operation for adding an entry to a stack is traditionally called :
►add
►append
►insert
►push(Page 53)




Question No: 10 ( Marks: 1 ) - Please choose one
The operation for removing an entry from a stack is traditionally called:
►delete
►peek
►pop(Page 53)
►remove






Question No: 11 ( Marks: 1 ) - Please choose one
We can add elements in QUEUE From
►Front
►Rear (Page 91)
►From Both Rare and Front
►None of these



Question No: 12 ( Marks: 1 ) - Please choose one
The difference between a binary tree and a binary search tree is that ,a binary search tree has
►two children per node whereas a binary tree can have none, one, or two children per node
Click here for detail
► in binary search tree nodes are inserted based on the values they contain
►in binary tree nodes are inserted based on the values they contain
► of these




Question No: 13 ( Marks: 1 ) - Please choose one
Suppose n is the number of nodes in a complete Binary Tree then maximum steps required for a search operation are,
► Log2 (n+1) -1 (Page 139)
►Log 2 (n+1)
►Log 2 (n) – 1
►Log 2 (n)




Question No: 14 ( Marks: 1 ) - Please choose one
The following is a segment of a C program. int pqr(BinaryNode t)
{ if (t == null )
return -1;
else
return 1+max(pqr(t.left),pqr(t.right)) }
Identify, what the above program intend(s) to do?
►Compute the height of a binary tree using an in-order traversal
►Compute the height of a binary tree using a pre-order traversal
►Compute the depth of a binary tree using a pre-order traversal
►Compute the depth of a binary tree using a post-order traversal




Question No: 15 ( Marks: 1 ) - Please choose one
Consider the following infix expression:
3 + 5 * 6 – 7 * (8 + 5)
Which of the following is a correct equivalent expression(s) for the above?
►3 65+*7 5 8 + -*
►3 657 5 8+* + -*
►3 5 6+*7 8 5 + -*
►3 5 6 * + 7 8 5 + * -






Question No: 16 ( Marks: 1 ) - Please choose one
An array is a group of consecutive related memory locations.
► TrueClick here for detail
► False




Question No: 17
( Marks: 1 )



Is this a correct statement? Give answer in Yes or No.




A node cannot be deleted, when the node to be deleted has both left and right subtrees.
False ---- No, it can be deleted.




Question No: 18 ( Marks: 1 )
Deleting a leaf node in binary search tree involves setting pointer/s of that node’s parent as null.
1
2
3
4






Select the one FALSE statement about binary trees:
a. Every binary tree has at least one node.
b. Every non-empty tree has exactly one root node.
c. Every node has at most two children.
d. Every non-root node has exactly one parent.






Below is a binary search tree. If we delete the value 50 using the algorithm we discussed, what value will be in the root of the remaining tree?






► 50


► 60


► 70


► 80



A tree is an AVL tree if
► Any one node fulfills the AVL condition
► At least half of the nodes fulfill the AVL condition
► All the nodes fulfill the AVL condition
► None of the given options




In the statement int x[6]; , we cannot assign any value to x because x is not an value.
► True
► False








Consider the following pseudo code declare a stack of characters while ( there are more characters in the word to read )
{
read a character
push the character on the stack
}
while ( the stack is not empty )
{
pop a character off the stack write the character to the screen
}
What is written to the screen for the input "apples"?
► selpa
► selppa
► apples
► aaappppplleess








In the following C++ code, how many function calls are made?
int x, y, z;
x = 2;
y = 3 + x;
z = foobar(x,y);
► 1
► 4
► 7
► 8












We can add elements in QUEUE From



► Front
► Rear
► From Both Rare and Front
► None of these








Consider the following tree.


How many descendants does the root have?
► 5
► 6
► 7
► 8






Which of the following statement regarding binary tree is NOT correct.
► A binary tree can contain at least 2L Nodes at level L.
► A complete binary tree of depth d is a binary tree that contains 2L Nodes at each level L between 0 and d, both inclusive.
► The total number of nodes (Tn ) in a complete binary tree of depth d is 2 d+1- 1 .
► The height of the complete binary tree can be written as h = log 2 (Tn+1)-1 where Tn is Total number of
Nodes.






The following are statements related to queues.
1. The last item to be added to a queue is the first item to be removed
2. A queue is a structure in which both ends are not used
3. The last element hasn’t to wait until all elements preceding it on the queue are removed
4. A queue is said to be a last-in-first-out list or LIFO data structure. Which of the above is/are related to normal queues?
► (iii) and (ii) only
► (i), (ii) and (iv) only
► (ii) and (iv) only
► None of the given options




The_ method of list data structure removes the element residing at the current position.



► Add
► next
► remove
► find






The depth of a binary tree is
Select correct option:
Total number of nodes in the tree Number of leaf nodes in the tree Number of non-leaf nodes in the tree Maximum level of a leaf*






In which traversal method, the recursive calls can be used to traverse a binary tree ? Select correct option:
In preorder traversal only
In inorder traversal only
In postorder traversal only
All of the given options*






Which of the following statement is false? Select correct option:
Arrays are dense lists and static data structure
data elements in linked list need not be stored in adjecent space in memory
pointers store the next data element of a list*
linked lists are collection of the nodes that contain information part and next pointer








Which of the following statement related to deleting nodes from a binary search tree is NOT
correct ?
Select correct option:
The node to be deleted has no children; the node can be deleted without any adjustment. Delete the leaf node and set reference from its parent to null reference.
The node to be deleted has two sub-trees. The method to be used is to replace the node being deleted by the rightmost child of its left sub-tree.
The node to be deleted has two sub-trees. The method to be used is to replace the node being deleted by the leftmost child of its right sub-tree.
The node to be deleted has no children; the node can be deleted with very few adjustments to the tree.* (not sure)



Which one of the following calling method does not change the original value of the argument in the calling function?
Select correct option:
Call by passing reference of the argument Call by passing the address of the argument Call by passing the value of the argument*
None of the given options




In-order traversal method traverses the data in
Select correct option:
Non sorted order Random order Sorted order* None of the given


The depth of a complete binary tree is given by
Select correct option: Dn = n log2n
Dn = n log2n+1
Dn = log2n
Dn = log2(n+1)-1*






If we write functions for recursive and non recursive in order traversal method of BST, what will be the difference between its functions prototypes?
Select correct option:
Different return types Different function names* Different arguments list Nothing will be different








In a program a reference variable, say x, can be declared as
Select correct option:
int &x ;*
int *x ;
int x ;
None of the given options








Which one is not the property of binary tree? Select correct option:
Every node in binary tree should have maximum two children.
Only one node should have two parents.*



Sibling nodes should have same parent. None of given options.






1. Here is a piece of code from inset method of BST, to search the correct position of newly created node.
while( *info != *(p->getInfo()) && q != NULL ) { p = q;
if( *info < *(p->getInfo()) ) q = p->getLeft();
else q = p->getRight(); }
If there are 8 levels in a tree then, how many times the while loop will be executed. Select correct option:
4
8 *
10
16








During in-order traversal using recursive calls, if we found a node is NULL. It means this node will satisfy following condition.
Select correct option:
It will not have left child
It will not have right child
It will not have both left and right children
None of given options *






During deletion of node from BST, if we found this node don’t have in-order successor and predecessor.
It means this node is . Select correct option:
Left most node in the binary search tree Right most node in binary search tree Root node * (not sure)
None of given options













Longest path from root node to farthest leaf node is called
Select correct option: Level Length Depth * Node level

of tree



Binary search algorithm cannot be applied to _ Select correct option:
sorted linked list * sorted binary trees sorted linear array None of given options









Deleting a

node in BST is a

case



Select correct option: Root, simplest
Left child, simplest Right child, simplest Leaf, simplest *






Which one is not the property of binary tree? Select correct option:
Every node in binary tree should have maximum two children.
Only one node should have two parents. * Sibling nodes should have same parent. None of given options.








In-order traversal method traverses the data in
Select correct option:
Non sorted order Random order Sorted order * None of the given






In which traversal method, the recursive calls can be used to traverse a binary tree ? Select correct option:
In preorder traversal only
In inorder traversal only
In postorder traversal only
All of the given options *


Question # 5 of 10 ( Start time: 02:07:23 AM ) Total Marks: 1
Which one is the correct function call for the following function of calculating cube? int cube(int& num) { . . . }
Select correct option: cube(&num) cube(&&num)



cube(*num)
cube(num) *


Question # 6 of 10 ( Start time: 02:08:02 AM ) Total Marks: 1
The depth of a complete binary tree is given by
Select correct option: Dn = n log2n
Dn = n log2n+1
Dn = log2n
Dn = log2(n+1)-1 *






Question # 7 of 10 ( Start time: 02:08:41 AM ) Total Marks: 1
1. Here is a piece of code from inset method of BST, to search the correct position of newly created node. while( *info != *(p->getInfo()) && q != NULL ) { p = q; if( *info < *(p-
>getInfo()) ) q = p->getLeft(); else q = p->getRight(); } If there are 8 levels in a tree then, how many times the while loop will be executed.
Select correct option:
4
8 *
10
16


Question # 8 of 10 ( Start time: 02:09:22 AM ) Total Marks: 1
If we write functions for recursive and non recursive inorder traversal method of BST, what will be the difference between its functions prototypes?
Select correct option:
Different return types Different function names * Different arguments list Nothing will be different


Question # 9 of 10 ( Start time: 02:09:43 AM ) Total Marks: 1
When converting binary tree into extended binary tree, all the original nodes in binary tree are


Select correct option:
Internal nodes on extended tree* External nodes on extended tree Vanished on extended tree
None of above
(dont know)


Question # 10 of 10 ( Start time: 02:10:07 AM ) Total Marks: 1
A binary tree whose every node has either zero or two children is called
Select correct option: Complete binary tree


Binary search tree Strictly binary tree * None of above
Quiz Start Time: 09:51 PM Time Left 66
sec(s)
Question # 4 of 10 ( Start time: 09:52:58 PM ) Total Marks: 1
Leaf node of binary search tree contains
Select correct option:

One Null pointer Three Null pointers Two Null pointers* All of the given