You are on page 1of 5


a)Difference between C & C++
In object oriented programming, the programmer can solve problems by breaking them down into real-life objects (it presented the programmer with an opportunity to mirror real life). What is an object? This topic is dealt with extensively in the chapter on µObjects and Classes¶ but a brief introduction is provided here. Consider the category of cars. All cars have some common features (for example all cars have four wheels, an engine, some body colour, seats etc.). Are all cars the same? Of course not. A Fiat and a Ford aren¶t the same but they are called as cars in general. In this example cars will form a class and Ford (or Fiat) will be an object. For those people who know C programming, it would be useful to know the differences between C and C++. Basically C++ includes everything present in C but the use of some C features is deprecated in C++. *C does not have classes and objects (C does not support OOP) *Structures in C cannot have functions. *C does not have namespaces (namespaces are used to avoid name collisions). *The I/O functions are entirely different in C and C++ (ex: printf( ), scanf( ) etc. are part of the C language). *You cannot overload a function in C (i.e. you cannot have 2 functions with the same name in C). *Better dynamic memory management operators are available in C++. *C does not have reference variables (in C++ reference variables are used in functions). *In C constants are defined as macros (in C++ we can make use of µconst¶ to declare a constant). *Inline functions are not available in C.

b)Diffrence between C++ & Java
Although both are object oriented programming language and Java was derived from C++ but still there is big difference between these two languages. You can see the actual difference once you start programming on it. But here i am going to give you few differences between these two...


Java does not support operator overloading 2. A class definition in Java looks similar to a class definition in C++, but there is no closing semicolon. 3. Forward reference declarations are not required in Java. 4. Scope resolution operator (::) required in C++ is but not in Java. 5. In C++ you have to re-declare static data members outside the class but such things are not required in Java

c)Diffrence between POP & OOPs
pop the work is done with the help of functions and more previlage is given to function and not the data, also you dont have data hiding,operator overloading, function overloading, access specifiers and inheritance features in pop and when your business logic expanded pop was not able to meet the required demand and because of this oops came inot action where in oops data used to get more importance,data hiding is possible with the help of access specifiers. Each object controls it's own data, Inheritance is possible and many more features are available

d)Diffrence between structure & Class e)Diffrence between abstract class & Interface in Java
Abstract classes Interfaces

Abstract classes are used only when there is a ³is-a´ type of relationship between the classes.

Interfaces can be implemented by classes that are not related to one another.

You cannot extend more than one abstract class.

You can implement more than one interface.

Abstract class can implemented some methods also.

Interfaces can not implement methods.

With abstract classes, you are grabbing away each class¶s individuality.

With Interfaces, you are merely extending each class¶s functionality.

e)Diffrence between malloc & calloc
here are two differences. First, is in the number of arguments. Malloc() takes a single argument (memory required in bytes), while calloc() needs two arguments (number of variables to allocate memory, size in bytes of a single variable). Secondly, malloc() does not initialize the memory allocated, while calloc() initializes the allocated memory to ZERO. Here are more opinions and answers:


Calloc(m, n) is essentially equivalent to p = malloc(m*n); memset(p, 0, m*n); The zero fill is all-bitszero, and does not therefore guarantee useful null pointer values or floating-point zero values. 'Free' is useable to release the memory allocated by malloc or calloc. Malloc(s); returns a pointer for enough storage for an object of s bytes. Calloc(n,s); returns a pointer for enough contiguous storage for n objects, each of s bytes. The storage is all initialized to zeros. Simply, malloc takes a single argument and allocates bytes of memory as per the argument taken during its invocation. Where as calloc takes two aguments, and calculates their product.



f)Diffrence betwen maaloc and 'new' keyword in java.
. malloc is a function call, while new is an operator. This difference is syntactic; behind the scenes, they both perform pretty much the same work to allocate the memory, and operator new also invokes any required constructors. There is a commonplace urban myth that operators are somehow faster in your code than functions; this is not correct, as any operator (except for mathematical operations that correspond directly to a single machine-code instruction) invocation amounts to a function call in any case. 2. malloc can fail, and returns a NULL pointer if memory is exhausted. Operator new never returns a NULL pointer, but indicates failure by throwing an exception instead. There is also a nothrow() version of operator new, which does return NULL on failure.

g)Diffrence between Stacks & Queue.

h)Diffrence between function overloading and function overriding
Overloading - Two functions having same name and return type, but with different type and/or number of arguments. Overriding - When a function of base class is re-defined in the derived class.

i)diffrence between Compiletime & Runtime polymorphism
Polymorphism is defined as one interface to control access to a general class of actions. There are two types of polymorphism one is compile time polymorphism and the other is run time polymorphism. Compile time polymorphism is functions and operators overloading. Runtime time polymorphism is done using inheritance and virtual functions. Polymorphism means that functions assume different forms at different times. In case of compile time it is called function overloading. For example, a program can consist of two functions where one can perform integer addition and other can perform addition of floating point numbers but the name of the functions can be same such as add. The function add() is said to be overloaded. Two or more functions can have same name but their parameter list should be different either in terms of parameters or their data types. The functions which differ only in their return types cannot be overloaded. The compiler will select the right function depending on the type of parameters passed. In cases of classes constructors could be overloaded as there can be both initialized and uninitialized objects. Here is a program which illustrates the working of compile time function overloading and constructor overloading.

j)Diffrence between Normalization and De-normalization in DBMS
Denormalization is the process of introducing redundancy into a table by incorporating data from a related table. Tables are usually denormalized to prevent expensive SQL join operations between them. One should always normalize to third-normal form and only apply denormalization selectively as a last resort if performance problems are experienced. Remember that denormalizations is not free and introduces the following problem into the design: More disk space is used as the same data is duplicated in more than one table DML operations are more expensive as the same data must be maintained in more than one table You run the risk that the data can get "out of sync"

k)Diffrence between DBMS & RDBMS
A DBMS has to be persistent, that is it should be accessible when the program created the data ceases to exist or even the application that created the data restarted. A DBMS also has to provide some uniform methods independent of a specific application for accessing the information that is stored. RDBMS is a Relational Data Base Management System Relational DBMS. This adds the additional condition that the system supports a tabular structure for the data, with enforced relationships between the tables. This excludes the databases that don't support a tabular structure or don't enforce relationships between tables. Many DBA's think that RDBMS is a Client Server Database system but thats not the case with RDBMS. Yes you can say DBMS does not impose any constraints or security with regard to data manipulation it is

user or the programmer responsibility to ensure the ACID PROPERTY of the database whereas the rdbms is more with this regard bcz rdbms define the integrity constraint for the purpose of holding ACID PROPERTY.

l)Difference between UNIX and Linux
UNIX is copyrighted name only big companies are allowed to use the UNIX copyright and name, so IBM AIX and Sun Solaris and HP-UX all are UNIX operating systems. The Open Group holds the UNIX trademark in trust for the industry, and manages the UNIX trademark licensing program.

Most UNIX systems are commercial in nature.

Linux is a UNIX Clone
But if you consider Portable Operating System Interface (POSIX) standards then Linux can be considered as UNIX.

m)Diffrence between instance & an object in Java.
An object is the class itself. An instance of that class (created using new MyClass()) is like an Identical copy of the object, but you can call non-static methods on it, whereas you can only call static methods on the class.