Stack is a collection of objects that works in LIFO (Last in First out) mechanism while Queue is FIFO (First in First out) This means that the object that is inserted first is removed last in a stack while an object that is inserted first is removed first in a queue
Correct Answer: Stack unwinding is a process of calling all destructors for all automatic objects constructed at run time when an exception is thrown Destructors are called between the places where the exception was thrown and where it is caught
Correct Answer: Wrapper classes wrap primitive values in a class and offers utility to access them through objects Some of the primitive wrapper data types are: Byte, short, int, long, float, double, char, Boolean Example: Create a class name VectorAdd to populate it with integer values using the add(int, object) method public class VectorAdd { public static void main(String argv[]) { Vector v = new Vector(); vadd(0,new Integer(10)); vadd(1,new Integer(20)); vadd(2,new Integer(30)); for(int i=0; i < vsize();i ++) { Integer iw =(Integer) vget(i); Systemoutprintln(iw); } } }
Correct Answer: STL stands for Standard Template Library It is a library of container templates approved by the ANSI committee for inclusion in the standard C++ specification
4. .What are Stacks? Give an example where they are useful.
Correct Answer: A Stack is a linear structure in which insertions and deletions are always made at one end ie the top - this is termed as last in, first out (LIFO) Stacks are useful when we need to check some syntex errors like missing parentheses
5. What are the advantages of using friend classes?
Correct Answer: - Friend classes are useful when a class wants to hide features from users which are needed only by another, tightly coupled class - Implementation details can be kept safe by providing friend status to a tightly cohesive class
Correct Answer: Scope resolution operator allows a program to reference an identifier in the global scope that is hidden by another identifier with the same name in the local scope
Correct Answer: - Free() - A block of memory previously allocated by the malloc subroutine is freed by free subroutine Undefined results come out if the Pointer parameter is not a valid pointer If the Pointer parameter is a null value, no action will take place - Realloc() - This subroutine changes the size of the block of memory pointed to by the Pointer parameter to the number of bytes specified by the Size parameter and returns a new pointer to the block The pointer specified by the Pointer parameter must be created with the malloc, calloc, or realloc subroutines and should not be deallocated with the free or realloc subroutines Undefined results show up if the Pointer parameter is not a valid pointer
Correct Answer: - Inheritence permits code reusability - Reusability saves time in program development - It encourages the reuse of proven and debugged high-quality software which reduces the problems after a system becomes functional
9. What is the role of QA in a project development?
Correct Answer: QA stands for QUALITY ASSURANCE QA team assures the quality by monitor the whole development process QA tracks the outcomes and adjusting process to meet the expectation The role of Quality Assurance is discussed below: - QA team is responsible for monitoring the process to be carried out for development - Responsibilities of QA team are planning testing execution process - QA Lead creates the time tables and agrees on a Quality Assurance plan for the product - QA team communicated QA process to the team members - QA team ensures traceability of test cases to requirements
10. What is severity and priority of bug? Give some example.
Correct Answer: Priority: concern with application from the business point of view It answers How quickly we need to fix the bug? Or How soon the bug should get fixed? Severity: concern with functionality of application It deals with the impact of the bug on the application