TCS PremiumMaterials 5 MyPlacementPrep PDF
TCS PremiumMaterials 5 MyPlacementPrep PDF
TCS PremiumMaterials 5 MyPlacementPrep PDF
www.MyPlacementPrep.com
www.MyPlacementPrep.com
Visit www.MyPlacementPrep.com .
India’s No1 website for Placement Materials and Free mock test Series
Free Placement Learning path now available with free video course.
Point to remember: Before interview You should decide your Favorite programming
language and be prepared based on that question.
8.Unlike C, JAVA does not support Preprocessors, & does not really them.
9.The standard Input & Output Functions--C uses the printf & scanf
functions as its standard input & output while JAVA uses the
System.out.print & System.in.read functions.
__________
Buy top competitive programming and coding question book to clear interview. 100+ solved
questions Buy top data structure and algorithm book to clear interview. 90+ Chapters
Join telegram channel for placement materials
here are four types of storage classes in C. They are extern, register, auto and static
____________________________________________________________________________________________
__________
Buy top competitive programming and coding question book to clear interview. 100+ solved
questions Buy top data structure and algorithm book to clear interview. 90+ Chapters
Join telegram channel for placement materials
9.What is an object?
Object is a software bundle of variables and related methods. Objects have state
and behavior
10.What is a class?
Class is a user-defined data type in C++. It can be created to solve a particular kind
of problem. After creation the user need not know the specifics of the working of a
class.
Structure: Initially (in C) a structure was used to bundle different type of data types
together to perform a particular functionality. But C++ extended the structure to
contain functions also. The major difference is that all declarations inside a structure
are by default public.
Class: Class is a successor of Structure. By default all the members inside the class
are private.
Pointer is a variable in a program is something with a name, the value of which can
vary. The way the compiler and linker handles this is that it assigns
a specific block of memory within the computer to hold the value of that variable.
A Null pointer has the value 0. void pointer is a generic pointer introduced by ANSI.
Generic pointer can hold the address of any data type.
return nX + nY; }
overloading is commonly used to create several functions of the same name that
perform similar tasks but on different data types.
Operator overloading allows existing C++ operators to be redefined so that they work
on objects of user-defined classes. Overloaded operators are syntactic sugar for
equivalent function calls. They form a pleasant facade that doesn't add anything
fundamental to the language (but they can improve understandability and reduce
maintenance costs).
The idea behind inline functions is to insert the code of a called function
at the point where the function is called. If done carefully, this can
improve the application's performance in exchange for increased
compile time and possibly (but not always) an increase in the size of the
generated binary executables.
Random.
Array: User need not have to keep in track of next memory allocation.
List: User has to keep in Track of next location where memory is allocated.
Array uses direct access of stored members, list uses sequential access for
members.
Arrays is a group of similar data types but Structures can be group of different data
types
23. Can you list out the areas in which data structures are applied extensively?
Compiler Design,
Operating System,
Database Management System, Statistical analysis package, Numerical
Analysis,
Graphics,
Artificial Intelligence, Simulation
The two types of integrity rules are referential integrity rules and entity integrity rules.
Referential integrity rules dictate that a database does not contain orphan foreign
key values. This means that A primary key value cannot be modified if the value is
used as a foreign key in a child table. Entity integrity dictates that the primary key
value cannot be Null.
26. Tell something about deadlock and how can we prevent dead lock?
Mutual Exclusion: At least one resource must be non-shareable.[1] Only one process
can use the resource at any given instant of time.
Hold and Wait or Resource Holding: A process is currently holding at least one
resource and requesting additionalresourceswhicharebeingheldbyotherprocesses.
No Preemption: The operating system must not de-allocate resources once they
have been allocated; they must be released by the holding process voluntarily.
Circular Wait: A process must be waiting for a resource which is being held by
another process, which in turn is waiting for the first process to release the resource.
In general, there is a set of waiting processes, P = {P1, P2, ..., PN}, such that P1 is
waiting for a resource held by P2, P2 is waiting for a resource held by P3 and so on
till PN is waiting for a resource held by P1.[1][7]
Thus prevention of deadlock is possible by ensuring that at least one of the four
conditions cannot hold.
27. What is Insertion sort, selection sort, bubble sort( basic differences among
the functionality of the three sorts and not the exact algorithms)
29.What is data abstraction? what are the three levels of data abstraction with
Example?
Lets take a person as example and see how that person is abstracted in various
situations
A doctor sees (abstracts) the person as patient. The doctor is interested in name,
height, weight, age, blood group, previous or existing diseases etc of a person
An employer sees (abstracts) a person as Employee. The employer is interested in
name, age, health, degree of study, work experience etc of a person.
Abstraction is the basis for software development. Its through abstraction we define
the essential aspects of a system. The process of identifying the abstractions for a
given system is called as Modeling (or object modeling).
preprocessor.
33.Which header file should you include if you are to develop a function which
can accept variable number of arguments?
stdarg.h
which stores copies of the data from the most frequently used main memory
locations. As long as most memory accesses are cached memory locations, the
average
latency of memory accesses will be closer to the cache latency than to the latency of
main memory.
35.What is debugger?
A debugger or debugging tool is a computer program that is used to test and debug
other programs
36. Const char *p , char const *p What is the difference between the
above two?
1) const char *p - Pointer to a Constant char ('p' isn't modifiable but the pointer is) 2)
char const *p - Also pointer to a constant Char
38.Explain the difference between 'operator new' and the 'new' operator?
The difference between the two is that operator new just allocates raw
memory, nothing else. The new operator starts by using operator new to
allocate memory, but then it invokes the constructor for the right type of
object, so the result is a real live object created in that memory. If that
object contains any other objects (either embedded or as base classes)
those constructors as invoked as well.
A spanning tree is a tree associated with a network. All the nodes of the graph
appear on the tree once.
Aminimumspanningtreeisaspanningtreeorganizedsothatthetotaledgeweightbetween
nodesis minimized.
42. Why should we use data ware housing and how can you extract data for
analysis with example?
o 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.
o 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.
43.Explain recursive function & what is the data structures used to perform
recursion?
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.
46.What is an interrupt?
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.
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.
right = size-1;
if(item == arr[middle])
{ return(middle); }
else
{
right = middle-1; }
}
return(-1); }
An enumeration is a data type, used to declare variable that store list of names. It is
act like a database, which will store list of items in the variable. example: enum
shapes{triangle, rectangle,...
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.
53.What is Cryptography?
program and a secret key) and leaving the recipient to unscramble the
message (with the same computer program and a key, which may or
may not be the same as the sender's key).
There are two types of cryptography: Secret/Symmetric Key
Cryptography and Public Key Cryptography
54.What is encryption?
55..What is decryption?
Decryption is the reverse of encryption; it's the transformation of encrypted data back
into some intelligible form.
Just as a handwritten signature is affixed to a printed letter for verification that the
letter originated from its purported sender, digital signature performs the same task
for an electronic message. A digital signature is an encrypted version of a message
digest, attached together with a message.
Write a program to find factorial of a number using recursive function. Describe 2 different
ways to concatenate two strings.
Give syntax for SQL and ORACLE joins.
How is modularity introduced in C++?
what is the length of the circular rod with diameter 8 inches and equal to volume of
rectangular plate?
How would you connect 8 dots with 3 lines.
Give the difference between the type casting and automatic type conversion. Also tell a
suitable C++ code to illustrate both.
Can you declare a private method as static?
How many JVMs can run on a single machine and what is the meaning of Just-In- Time (JIT)
compiler?
Differentiate between copy and default constructor.
www.MyPlacementPrep.com
Visit www.MyPlacementPrep.com .
India’s No1 website Placement and Mock Test series
Free Placement Learning Path with Free Video Course.