Technical Interview Questions and Answers :: TCS
Total Qs: 156+
Total View: 63.92K
DDL stands for Data Definition Language. DML stands for Data Manipulation Language. DDL commands are used to create,alter,truncate,drop,rename etc. Where DML are used to insert,update,delete,merge etc.,
USED TO CONVERT HIERACHICAL STRUCTURE TO THE FLAT STRUCTURE. IT IS USED TO JOIN A TABLE ITSELF AS LIKE IF THAT IS THE SECOND TABLE
5. Classes and Object
A method with changed formal parameters will lead to implementing method overloading.
int calculateSum(int i,int j)
float calculateSum(float i,int j)
double calculateSum(double i,int j)
float calculateSum(int i,float j)
The method with the same signature but with changed implementation lead to method overriding and that can occur in a parent child relation of classes. A method defined in parent class can be overridden in its child class with different implementation from its base class.
1. Pointers are supported in C++ while not in Java. The memory management is done automatically with help of part of JVM called Garbage Collector.
2. Multiple inheritance is not supported in Java but supported in C++.
3. There are no structures and unions in Java.
4. There is no scope resolution operator in Java (::).
5. There are no destructors in Java like C++.
6. There is no virtual keyword in Java because all non-static method use dynamic binding.
Multiple inheritence is not supported in Java because of ambuiguity that it causes.
An exception is a problem that arisesduring excecution. Checked exceptions are the exceptions that gets checked at the compile time. Unchecked exceptions are not checked at compile time, in Java all exceptions are unchecked exceptions.
Container class is a class that hold group of same or mixed objects in memory. It can be heterogeneous and homogeneous. Heterogeneous container class can hold mixed objects in memory whereas when it is holding same objects, it is called as homogeneous container class.
This means if one member variable of union is updated then the rest will be updated as well. This also leads compilation error when initializing multiple members at a time as the memory locations are not different. So in case of union only one member should be initialized at a time.
By using a friend function.
A friend function has access to all private and protected members of the class for which it is a friend.
1. C can run most of the code of C, but C can't run C code.
2. C supports procedural programming paradigm whereas C supports both procedural and object oriented programming paradigm.
3. C is a function driven and C is an object driven language.
4. C doesn't allow function definitions within structures whereas in C function definition can be within structures.
5. C doesn't support reference variables but C does support.