Here in this post we will give BARC Interview Questions and ANSWERS that were asked in 2021 and How you can Prepare for next BARC interview.
WHAT IS BARC EXAM?
BARC Exam is a for Engineering and Science graduates. The Exam has is divided into 2 phases 1.Online exam/GATE score and 2. Personal Interview. It is a national level examination conducted online.The cut off of this Exam remains high so you need be good to crack this exam.
TOP 33:BARC Interview Questions and Answers 2021
1. How fopen() works in operating system?
ANSWER: The fopen() method in C is a library function that is used to open a file to perform various operations which include reading, writing etc. along with various modes. If the file exists then the particular file is opened else a new file is created.
2. when you prefer to use linked list and when array?
ANSWER:
when you prefer to use ARRAY
- Random access
- Cache friendly ness
when you prefer to use LINKED LIST
- Insertion at middle
- Deletion at middle
- Implementation of queue and deque
3. Traversing linked list in reverse order.
void print_list(node* traverse)
{
if (traverse == NULL) return;
print_list(traverse->next);
std::cout << traverse->data << std::endl;
}
This is maybe the first answer to come in mind. However, the process stack size is limited, so recursion has a pretty low limit. A big list will provoke a stack overflow. This is not a very good design in C++.
after that they asked what will I do if linked list is circular or there is cycle present in linked list and what will I do if nodes of linked list are holding variable length data.
4. what happens when we type www.google.com on our web browser?
ANSWER:
- The browser extracts the domain name from the URL.
- The browser queries DNS for the IP address of the URL. Generally, the browser will have cached domains previously visited, and the operating system will have cached queries from any number of applications. If neither the browser nor the OS have a cached copy of the IP address, then a request is sent off to the system’s configured DNS server. The client machine knows the IP address for the DNS server, so no lookup is necessary.
- The request sent to the DNS server is almost always smaller than the maximum packet size, and is thus sent off as a single packet. In addition to the content of the request, the packet includes the IP address it is destined for in its header. Except in the simplest of cases (network hubs), as the packet reaches each piece of network equipment between the client and server, that equipment uses a routing table to figure out what node it is connected to that is most likely to be part of the fastest route to the destination. The process of determining which path is the best choice differs between equipment and can be very complicated.
- The is either lost (in which case the request fails or is reiterated), or makes it to its destination, the DNS server.
- If that DNS server has the address for that domain, it will return it. Otherwise, it will forward the query along to DNS server it is configured to defer to. This happens recursively until the request is fulfilled or it reaches an authoritative name server and can go no further.
- Assuming the DNS request is successful, the client machine now has an IP address that uniquely identifies a machine on the Internet. The web browser then assembles an HTTP request, which consists of a header and optional content. The header includes things like the specific path being requested from the web server, the HTTP version, any relevant browser cookies, etc.
- This HTTP request is sent off to the web server host as some number of packets, each of which is routed in the same was as the earlier DNS query. (The packets have sequence numbers that allow them to be reassembled in order even if they take different paths.) Once the request arrives at the webserver, it generates a response (this may be a static page, served as-is, or a more dynamic response, generated in any number of ways.) The web server software sends the generated page back to the client
after that there some more questions related to subnet mask and ARP request and reply.
5. How DNS caching is implemented on intranet?
ANSWER:
6. How files are stored in HDD?
ANSWER:
The part of the hard disk that stores the data is known as platter. Platters are circular disk made of a non magnetic material typically aluminum alloy, glass or ceramic and are coated with a thin layer (10-20nm) of a magnetic material. Platters are further separated in to the tracks and sectors where tracks are concentric circles while sectors are pie shaped wedges on the track.
Hard disk stores information in the form of magnetic fields. Data is stored digitally in the form of tiny magnetized regions on the platter where each region represents a bit. To write a data on the hard disk, a magnetic field is placed on the tiny field in one of these two polarities: N-S – If North Pole arrives before the south pole and S-N – if the south pole arrives before the north pole while the field is accessed. An orientation in the one direction (like N-S) can represent the ‘1’ while the opposite orientation (S-N) represents “0”. This polarity is sensed by integrated controllers built within the hard disk.
after that many more questions from seek time, rotational latency, track density, Disk scheduling algorithms and some case studies related to rotational latency and contiguous memory allocation.
7. Some sql queries.
ANSWER:
Get Average Values for Data
SELECT AVG (book_Price) FROM BOOKSHOP; |
Remove Column From a Table
ALTER TABLE BOOKSHOP DROP COLUMN book_price; |
8. Features that I expect while purchasing a Laptop.
ANSWER:
- RAM
- Screen Quality
- CPU
- STORAGE
- SIZE OF LAPTOP
9. multicore system and purpose of using it.
ANSWER:
A multi-core processor is a computer processor on a single integrated circuit with two or more separate processing units, called cores, each of which reads and executes program instructions.[1] The instructions are ordinary CPU instructions (such as add, move data, and branch) but the single processor can run instructions on separate cores at the same time, increasing overall speed for programs that support multithreading or other parallel computing techniques.[2] Manufacturers typically integrate the cores onto a single integrated circuit die (known as a chip multiprocessor or CMP) or onto multiple dies in a single chip package. The microprocessors currently used in almost all personal computers are multi-core.
10. which one I prefer among SSD and HDD and why?
ANSWER: SSDs are faster than Hdds as these use flash memory and unlike HDDsare free from mechanical moving parts which use battery. Hence ssds also has prolong battery life.
11. why SSD is faster than HDD?
12. Full form of SSD.
ANSWER: SSD Stands for Solid State Drive
13. Computer clock speed.
ANSWER:A CPU’s clock speed represents how many cycles per second it can execute. Clock speed is also referred to as clock rate, PC frequency and CPU frequency. This is measured in gigahertz, which refers to billions of pulses per second and is abbreviated as GHz.
A clock speed of 3.5 GHz to 4.0 GHz is generally considered a good clock speed for gaming but it’s more important to have good single-thread performance.
14.Explain hashing in detail(what is hashing, types of hashing, complete code in C/C++ to insert an element, they asked about time complexity to find an element in open chaining, etc.).
ANSWER:Hashing is generating a value or values from a string of text using a mathematical function. It is one way to enable security during the process of message transmission when the message is intended for a particular recipient only. A formula generates the hash, which helps to protect the security of the transmission against tampering. Hashing is also a method of sorting key values in a database table efficiently.
For code visit: https://www.geeksforgeeks.org/hashing-data-structure/
15.How Binary search works and how it is different from hashing. What is the time complexity of binary search? Why is it logn?
16.What happens if we divide the array in 3/4th and then use binary search, are comparisons increase, decrease, or remains the same and why?
17.Given a directed graph, how to detect a cycle in the graph? What is the time complexity of your algorithm by using an adjacency matrix/list?
18.What is an integer pointer? How it is different from an array of pointers?
ANSWER: integer pointer holds the address of an integer variable
19.Scanning two indices of an array using pointers
20.2-D matrix representation using pointers and accessing elements.
21.Check whether two strings are the same, less than, or greater than using pointers.
// C++ Program to compare two strings using Pointers #include <iostream> using namespace std;
// Method to compare two string using pointer bool compare(char *str1, char *str2) { while (*str1 == *str2) { if (*str1 == '\0' && *str2 == '\0') return true; str1++; str2++; } return false; } int main() { // Declare and Initialize two strings char str1[] = "repells"; char str2[] = "repells"; if (compare(str1, str2) == 1) cout << str1 << " " << str2 << " are Equal"; else cout << str1 << " " << str2 << " are not Equal"; }
22.Passing a function name as a parameter to other functions using the concept of pointers.
23.Explain Wi-Fi architecture, how wi-fi works?
ANSWER: http://www.cs.miami.edu/home/burt/learning/Csc524.052/notes/wifi.html https://www.geeksforgeeks.org/basics-of-wi-fi/
24.Explain Bluetooth architecture, how it works?
25.Explain the TCP/IP model, briefly explain any protocol of your choice, how it works?
ANSWER:https://www.guru99.com/tcp-ip-model.html
26.Explain TCP handshake mechanism(Connection establishment, Data Transfer, Connection Termination phase in detail).
27.What is Redo/Undo in DBMS?
ANSWER:https://www.youtube.com/watch?v=JAMRnR1dkQc
28.what is the concept of log files?
ANSWER: A computer file that contains a record of all actions that have been done on a computer, a website, etc.:
Many online news organizations‘ log files show that photo galleries are among their most popular destinations. The site administrator can look at the log file to determine when the error occurred
29.What are cursors?
ANSWER:
A cursor is a temporary work area created in the system memory when a SQL statement is executed. A cursor contains information on a select statement and the rows of data accessed by it. This temporary work area is used to store the data retrieved from the database, and manipulate this data. A cursor can hold more than one row, but can process only one row at a time. The set of rows the cursor holds is called the active set.
There are two types of cursors in PL/SQL :
- Implicit cursors.
- Explicit cursors.
30.Write an SQL query to find duplicates names from a table given that the Table does not have any primary key.
31.What is linking and how it is done?
32.What is the difference between Machine Learning and Deep learning?
https://www.geeksforgeeks.org/difference-between-machine-learning-and-deep-learning/
33.What is the difference between regression and Interpolation
ANSWER:
In few words:
Interpolation = fitting a (noisy signal) from a fixed basis or model;
Inversion = recovering a known signal from noisy measurements;
Regression = fitting a (noisy) signal from other noisy signals, somewhat called instrumental variables
IS BARC INTERVIEW TOUGH?
Above we have discussed the questions now it is upto you to decide.But according to me it is not the toughest but we need to be smart about how you answer each question. Just be good with the basics and make your root strong .If you try to be over smart there then you won’t crack it. Don’t study a lot of books for it, have a proper strategy for developing a brain that tries to explain phenomenons. Trust me doing it is very easy and can be done in just one month.
HOW TO PREPARE FOR BARC CSE INTERVIEW?
- Read previous interview experiences and go through BARC interview Questions.
- Revise GATE syllabus thoroughly once, you can use your GATE notes. Now focus will be on assertion-reason rather solving numerical questions. Why threading when multiprocessing is already there ? How will you design a firewall to stop a set of IP addresses ? What is the need of pipelining ? What other kinds of Databases are available ? Can you list some compiler optimizations and why they are used ? which algorithm will you prefer when people are submitting forms on BARC website and we need to sort them based on name ? How priority queues are implemented ? What is CPU clock speed and what factors affect CPU clock speed ? Write a program to find whether two rectangles are overlapping or not ?
- Pick 4-5 favorite subjects and do extra revision. I used GeeksforGeeks articles during my preparations. They are effective also they are written in a very practical and comparative aspect.
- Try to retain basic pseudo codes in mind, like bakery algorithm, Peterson solution, congestion control alogrithm, Longest common subsequence etc.
- Try to touch those topics also which you have ignored partially or completely during GATE, because they ask question on them also.Like, what is CISC architecture, Symmetric and asymmetric multiprocessing, What are inodes and how free space are managed, etc.
Hope this post gives you a overall idea of BARC interview Process and BARC interview Questions . Give us a feedback if you liked our content if not do suggest what more can we provide and if you are looking for company wise Interview question do look into INTERVIEW QUESTIONS 2021.