TCS Technical Interview Questions and Answers For Freshers Part-5
A spanning tree is a tree associated with a network. All the nodes of the graph appear on the tree once. A minimum spanning tree is a spanning tree organized so that the total edge weight between nodes is minimized.
42. Why should we use data ware housing and how can you extract data for analysis with example?
If you want to get information on all the techniques of designing, maintaining, building and retrieving data, Data warehousing is the ideal method. A data warehouse is premeditated and generated for supporting the decision making process within an organization.
Here are some of the benefits of a data warehouse:
With data warehousing, you can provide a common data model for different interest areas regardless of data’s source. In this way, it becomes easier to report and analyze information.
Many inconsistencies are identified and resolved before loading of information in data warehousing. This makes the reporting and analyzing process simpler.
The best part of data warehousing is that the information is under the control of users, so that in case the system gets purged over time, information can be easily and safely stored for longer time period.
Because of being different from operational systems, a data warehouse helps in retrieving data without slowing down the operational system.
Data warehousing enhances the value of operational business applications and customer relationship management systems.
Data warehousing also leads to proper functioning of support system applications like trend reports, exception reports and the actual performance analyzing reports.
Data mining is a powerful new technology to extract data for analysis.
43.Explain recursive function & what is the data structures used to perform recursion?
a) A recursive function is a function which calls itself.
b) The speed of a recursive program is slower because of stack overheads. (This attribute is evident if you run above C program.)
c) A recursive function must have recursive conditions, terminating conditions, and recursive expressions.
Stack data structure . Because of its LIFO (Last In First Out) property it remembers its caller so knows whom to return when the function has to return. Recursion makes use of system stack for storing the return addresses of the function calls. Every recursive function has its equivalent iterative (non-recursive) function. Even when such equivalent iterative procedures are written, explicit stack is to be used.
44.Differentiate between Complier and Interpreter?
An interpreter reads one instruction at a time and carries out the actions implied by that instruction. It does not perform any translation. But a compiler translates the entire instructions
45.What is scope of a variable?
Scope refers to the visibility of variables. It is very useful to be able to limit a variable’s scope to a single function. In other words, the variable wil have a limited scope
46.What is an interrupt?
Interrupt is an asynchronous signal informing a program that an event has occurred. When a program receives an interrupt signal, it takes a specified action.
47.What is user defined exception in Java?
The keywords used in java application are try, catch and finally are used in implementing used-defined exceptions. This Exception class inherits all the method from Throwable class.
48.What is java Applet?
Applet is java program that can be embedded into HTML pages. Java applets runs on the java enables web browsers such as mozila and internet explorer. Applet is designed to run remotely on the client browser, so there are some restrictions on it. Applet can’t access system resources on the local computer. Applets are used to make the web site more dynamic and entertaining.
49.What do you know about the garbage collector?
Garbage collection is the systematic recovery of pooled computer storage that is being used by a program when that program no longer needs the storage. This frees the storage for use by other programs
(or processes within a program). It also ensures that a program using increasing amounts of pooled storage does not reach its quota (in which case it may no longer be able to function).
Garbage collection is an automatic memory management feature in many modern programming languages, such as Java and languages in the .NET framework. Languages that use garbage collection are often interpreted or run within a virtual machine like the JVM. In each case, the environment that runs the code is also responsible for garbage collection.
50. What is static identifier?
The static identifier is used for initializing only once, and the value retains during the life time of the program / application. A separate memory is allocated for static variables. This value can be used between function calls. The default value of an uninitialized static variable is zero. A function can also be defined as a static function, which has the same scope of the static variable.