50 Interview Qs One Line
50 Interview Qs One Line
Important programming languages for TCS campus interviews are 1) C programming, 2) C++
programming, and 3) Java programming.
The primary difference between the two is that Java is an object-oriented programming language,
whereas C is a procedural programming language.
Four storage classes available in C languages are 1) register, 2) auto, 3) extern, and 4) static.
It is an access specifier. The value of a static variable does not change during the execution of the
program.
It is a feature of C++ that allows you to create more than one function with a similar name. Functions
can be identified using their parameters.
Referential integrity rule states that the database does not contain orphan record foreign key values.
In this case, the primary key value cannot be modified if you have used this value as a foreign key in
the child table.
In entity integrity rules, you cannot keep the primary key value null.
Class is a building blog of object-oriented programming which contains a group of data member and
its function. You can access them by creating an instant class.
An object is a real-world entity. Some examples of the object are computer, notebook, pen, and bag.
9) Define macros.
• The structure is user define data type. It contains a group of dissimilar data types.
11) List out some areas in which data structure is applied extensively.
• Numerical analysis
• Artificial intelligence
• Operating system
12) How can you reuse code written in C++ programming language?
• Mutual exclusion
• Resource holding
• No preemption
• Circular wait
Insertion sort is a sorting algorithm in where the final list or array is built having one item at a time.
In bubble sort, you interchange adjacent elements if the order is not proper.
15) Explain the concept of doubly link list.
A link data structure called a doubly link list includes a link back to the previous node.
16) You are creating a function which can accept a variable number of arguments. Which header
file you will include?
17) What do you mean by data abstraction? Explain three levels of data abstractions.
Data abstraction is a process of recognizing the characteristics of an object or any situation and
filtering out unwanted characteristic.
• Physical level: Depicts how you will store data in the database
• View level: End-user work on this level, and if any changes found, they will be saved by
another name.
It is a process of getting arguments from the command prompt in C programming. There are three
arguments in C main function. Argument counter, Argument vector, and environment vector.
A cache is a small size computer memory that is used by CPU to reduce average cost to access data
from main memory.
20) Explain the difference between pass by reference and pass by value.
In pass by value, we pass the value to calling function. In Pass by reference, we need to pass the
address to the caller function instead of passing the value.
A variable which stores the address of value located in memory is called pointer.
Operator overloading is a polymorphism which allows existing operators to be redefined so that they
can be used on objects of user-defined classes.
There are five types of inheritance in C++ programming. They are 1) Single inheritance, 2) Multiple
Inheritance, 3) Multi level Inheritance, 4) Hybrid Inheritance, and 5) Hierarchical Inheritance.
A database should be normalized so that you can organize a database efficiently. You should also
normalize a database to remove redundant data.
DBMS stands for Database Management System. It is a software used to manage your database.
DBMS provides an interface between application and databases.
Conditional statements are also known as a conditional expression or if-then statement. Conditional
statements are a set of rules. These rules will be executed only if the condition is true.
28) Explain the difference between the foreign key and the referenced key.
A foreign key is used to link to tables. On the other side, the reference key is a primary key that is
referenced in the other table.
C++ C
An array is a data structure which contains similar elements. The necessary condition to use an array
is that all array elements should have the same data type.
• calloc(): This function allocates memory and initializes this memory block to zero. It returns a
pointer to the block of memory.
• malloc(): This function reserves a memory area, and it returns a pointer of void type.
34) What is the main difference between const char *p and char const *p?
Both are pointers to a constant Char. However, if you write char * const p, then this will declare ‘p’ as
a constant pointer to char.
In Data structure, memory alignment is a method to arrange the data and access in the memory
block.
It is a single parameter constructor, that is declared without ‘explicit’ function specifier. Conversion
constructor can be called with a single parameter (until C++11) is called a converting constructor.
Tree is an abstract data type. It represents the nodes which are connected by edges.
38) What is data warehousing? Why should we use data warehousing?
A data warehouse is a business intelligence tool that stores data from operational databases as well
as from external sources. It supports decision-making process in an organization.
We should use a data warehouse to ensure consistency of collected data. It also helps business
leaders to develop data-driven strategies.
There are mainly six types of recursion: 1) linear recursion, 2) tail recursion, 3) binary recursion, 4)
exponential recursion 5) nested recursion, and 6) mutual recursion.
• A compiler is a program that process code written in C and convert into machine language.
• An interpreter is a program that directly executes C code without compiling into machine
language.
Scope means visibility of any variable. Visibility of variable is limited to program or function.
The keywords try, catch, and finally are used to implement a user define custom exception Java. In
java, you can create an exception class and throw an exception using throw keyword.
In Java, a garbage collector is a program that manages memory automatically and removes unused
objects.
It is a user-defined data type that is used to assign names to constants. It makes the program easy to
read.
The static identifier is initialized only once, and its value retains during the lifetime of the application.
The memory value allocated by the static variable can be used between the function call. The default
value of an uninitialized static identifier is zero.
46) Explain encryption.
It is a process of converting text into code. The primary purpose of encryption is to prevent
unauthorized access.
It is the transformation of encrypted data and converting it into meaningful text that you can read
and understand.
It is a technique used to validate the authenticity of the message. A digital signature is actually an
encrypted version of the message digest.
The four basic principles of Object-Oriented Programming System are 1) Abstraction, 2) Inheritance,
3) Encapsulation, and 4) Polymorphism.
Software development life Cycle or application development lifecycle is a term used in software
engineering to describe the process of developing software. This process contains 4 phases: 1)
planning, 2) creating, 3) testing and 5) deploying.