Technical Interview Preparation: (Part I)

Hi there! I hope you’re doing well. In this article, you are going to find some technical interview questions and answers that can help to get an idea of how to prepare for technical interview.
{C}
1) What is the difference between call by value and call by reference?
Ans. When using call by value, you are sending the value of a variable as a parameter to a function, whereas call by reference sends the address of the variable.
Also, under call by value, the value in the parameter is not affected by whatever operation that takes place, while in the case of call by reference, values can be affected by the process within the function.
2) Different between source code and object code?
Ans. Source code is the code written by the programmer. However, computers would be not able to understand source codes. Therefore source code is compiled using compilers. The resulting outputs are object codes, which are in a format that can be understood by the computer processor.
3) Can I use the “int” data type to store the value 32768? why?
Ans. No “int” data types are capable of storing values from -32768 to 32767. To store 32768, you can use “long int” instead.
4) What is the difference between the expression “++a” and “a++”?
Ans. In prefix increment i.e. “++a”, the increment would happen first on variable a, and the resultant value will be the one to be used.
In postfix increment, “a++”, the current value of ‘a’ would be the one to be used in an operator, before the value of itself is incremented.
5) Is this program statement valid? INT=10.50;
Ans. Assuming that INT is a variable of type float, this statement is VALID.
“int” is a reserved keyword, not “INT”.
6) Write a program to print “hello” without using a semicolon(;).
Ans.
#include<stdio.h>int main(){if(printf(“hello”)){}return 0;}
𝓓𝓪𝓽𝓪 𝓢𝓽𝓻𝓾𝓬𝓽𝓾𝓻𝓮 𝓪𝓷𝓭 𝓐𝓵𝓰𝓸𝓻𝓲𝓽𝓱𝓶

- What is a Data Structure?
Ans. According to Wikipedia, a data structure is a data organization, management, and storage format that enables efficient access and modification. More precisely, a data structure is a collection of data values, the relationships among them, and the functions or operations that can be applied to the data. - What are the various operations that can be performed on different Data Structures?
- Insertion: Add a new data item in the given collection of data items.
- Deletion: Delete an existing data item from the given collection of data items.
- Traversal: Access each data item exactly once so that it can be processed.
- Searching: Find out the location of the data item if it exists in the given collection of data items.
- Sorting: Arranging the data items in some order i.e. in ascending or descending order in case of numerical data and in dictionary order in case of alphanumeric data
3. What is Stack?
Ans. The stack is a linear data structure in which the order LIFO(Last In First Out) or FILO(First In Last Out) for accessing elements. Basic operations of the stack are: Push, Pop, Peek
4. What are the Primitive data types?
Ans. A primitive data type is one that is inbuilt into the programming language for defining the most basic types of data. These may be different for the various programming language available.
For example, the C programming language has inbuilt support for a character(char), integer(int), and real numbers(float, double).
5. Briefly explain the approaches to develop algorithms.
There are three commonly used approaches to develop algorithms −
- Greedy Approach − finding the solution by choosing the next best option.
- Divide and Conquer − diving the problem to a minimum possible sub-problem and solving them independently.
- Dynamic Programming − diving the problem to a minimum possible sub-problem and solving them combinedly.
6. What is the advantage of the heap over a stack?
Basically, the heap is more flexible than the stack. That’s because memory space for the heap can be dynamically allocated and de-allocated as needed. However, the memory of the heap can at times be slower when compared to that stack.
7. Applications of data structures.
Array : Used in speech processing.
Linked List : Used by browser to link Web pages and then access them.
Stack : History of visited websites(Latest appears first).
Queue : Used to arrange data packets in communication.
Tree : Used in machine learning for decision-based algorithms.
Hash Table : Used by browsers to generate the output based on hashing.
ᗪatabase ᗰanagement ᔕystem
- What are the ACID properties?
A: Atomicity
The entire transaction will take place at once or doesn’t happen at all.
C: Consistency
The Database must be consistent before and after the transaction.
I: Isolation
Multiple transactions occur independently without any interference.
D: Durability
The changes of a successful transaction occur even if the system failure occurs.
2. What are the disadvantages of file processing systems?
- Inconsistent
- Not secure
- Data redundancy
- Difficult in accessing data
3. What is the E-R model?
Ans. E-R model is a short name for the Entity-Relationship model. This model is based on the real world. It contains necessary objects (known as entities) and the relationship among these objects. Here the primary objects are the entity, attribute of that entity, relationship set, an attribute of that relationship set can be mapped in the form of an E-R diagram.
In the E-R diagram, entities are represented by rectangles, relationships are represented by diamonds, attributes are the characteristics of entities and represented by ellipses, and data flow is represented through a straight line.
4. What is the normalization of databases?
Ans. Normalization is the process of organizing data in a database efficiently. Two goals of the normalization process are: to eliminate redundant data (for example, storing the same data in more than one table) and also ensure data dependencies make sense (only storing related data in a table). These both are important as they reduce the amount of space a database consumes and ensure that data is logically stored.
5. Define Foreign Key?
A Foreign Key is a combination of columns with value is based on the primary key values from another table. A foreign key constraint is also known as Referential Integrity Constraint.
◯perating System
- What is the Operating System?
Ans. An operating system is system software that manages computer hardware, software resources, and provides common services for computer programs. - Difference between program and process.
Ans. The major difference between program and process is that the program is a group of instructions to carry out a specified task whereas the process is a program in execution. While a process is an active entity, a program is considered to be a passive one. - Define the Process States.

4. What is a Process Control Block?
Ans. A process control block is a data structure used by computer operating systems to store all the information about a process. It is also known as a process descriptor. When a process is created, the operating system creates a corresponding process control block.
5. Types of OS
6. What is Convoy Effect?
Ans. If the CPU gets the processes of the higher burst time at the front end of the ready queue then the processes of lower burst time may get blocked which means they may never get the CPU if the job in the execution has a very high burst time. This is called the convoy effect also known as starvation.
Thanks for Reading!
All the Best!!

Please leave comments, feedback, and suggestions as I am always trying to improve.For any doubts, ideas or queries feel free to reach me on:1. LinkedIn2. GitHub3. Twitter