Filter interviews by
Yes, pointers can be added, subtracted, and manipulated in various ways.
Pointers can be incremented or decremented to access different memory locations.
Pointer arithmetic can be used to iterate over arrays or manipulate data structures.
Adding or subtracting an integer to a pointer moves it by that many elements in the array.
Reverse a doubly linked list using both recursive and non-recursive methods.
Start with the head pointer and initialize two pointers, prev and next.
For the non-recursive method, iterate through the list and update the prev and next pointers.
For the recursive method, recursively call the reverse function on the next node and update the pointers.
Remember to update the head pointer at the end.
Explanation of array of pointers, pointer to arrays, and their byte sizes.
Array of pointers: An array where each element is a pointer to another data type.
Pointer to arrays: A pointer that points to the first element of an array.
Byte sizes: The amount of memory occupied by each of these constructs.
Big endian is a system where the most significant byte is stored first, while little endian is the opposite.
Big endian: MSB first (e.g. 0x1234 is stored as 12 34)
Little endian: LSB first (e.g. 0x1234 is stored as 34 12)
Check if a linked list is circular by using two pointers.
Initialize two pointers, slow and fast, both pointing to the head of the linked list.
Move slow pointer by one node and fast pointer by two nodes at a time.
If the linked list is circular, the fast pointer will eventually catch up with the slow pointer.
If the fast pointer reaches the end of the list (null), the linked list is not circular.
A macro to set a particular bit of a number.
Use bitwise OR operator to set the bit at the desired position.
Shift 1 to the left by the desired position to create a mask.
Perform bitwise OR operation between the number and the mask to set the bit.
Paging is a memory management technique that allows the operating system to store and retrieve data from secondary storage.
Paging divides the memory into fixed-size blocks called pages.
It allows for efficient memory allocation and management.
Each page is mapped to a frame in physical memory.
Segmentation is another memory management technique that divides the memory into variable-sized segments.
Segments can be of differ...
Reverse a singly linked list
Iteratively swap the next and previous pointers of each node
Use three pointers to keep track of the current, previous, and next nodes
Update the head pointer to the last node after reversing
Program logic to solve Sudoku
Implement a backtracking algorithm
Start with an empty grid
Iterate through each cell and try different numbers
If a number is valid, move to the next cell
If no valid number is found, backtrack to the previous cell
Repeat until the grid is filled or no solution is possible
The maximum memory that can be allocated with malloc() depends on the system's available memory and the size of the largest contiguous block of memory.
The maximum memory that can be allocated is limited by the system's available memory.
The size of the largest contiguous block of memory also affects the maximum memory that can be allocated.
malloc() returns a null pointer if the requested memory cannot be allocated.
Virtual memory is a memory management technique that allows the operating system to use a combination of RAM and hard disk space.
Virtual memory is a way for the operating system to provide more memory to applications than what is physically available in RAM.
It creates an illusion of a larger memory space by using a portion of the hard disk as an extension of RAM.
Virtual memory allows multiple processes to run simultane...
Virtual memory allows the operating system to use disk space as an extension of RAM when there is no swap space.
Virtual memory allows programs to use more memory than physically available.
It provides a way to manage memory efficiently by swapping data between RAM and disk.
Without swap space, virtual memory cannot be used effectively.
Virtual memory helps in running large programs and multitasking.
It allows for memory pr
The output of p1 depends on the synchronization mechanism used by the operating system.
If the OS uses a lock or semaphore to synchronize access to the shared address, p1 will read the value written by p2.
If the OS does not provide any synchronization mechanism, the output of p1 is unpredictable and may vary.
The role of the OS is to manage the execution of processes, provide synchronization mechanisms, and ensure data i
The padding size for the last member of a struct is determined by the alignment requirements of the struct.
Padding is added to ensure that each member of the struct is properly aligned in memory.
The padding size depends on the size and alignment requirements of the previous members.
The compiler may also consider the target architecture and optimization settings when determining padding size.
C code to delete a node from circular doubly linked list without deleting the head node.
Start from the head node and traverse the list until the desired node is found.
Update the next and previous pointers of the adjacent nodes to skip the node to be deleted.
Free the memory allocated for the node to be deleted.
The sizeof(p) will return the size of the array of pointers, while sizeof(q) will return the size of a pointer to an array.
sizeof(p) will be equal to 5 times the size of a pointer
sizeof(q) will be equal to the size of a pointer
Static and global variables have different scopes and lifetimes depending on where they are declared.
Static variables declared inside a function retain their value between function calls.
Static variables declared outside any function have file scope and are accessible within the file.
Global variables have global scope and can be accessed from any part of the program.
Global variables are initialized only once and retain
Code to reverse a doubly linked list
Start from the head of the linked list
Swap the prev and next pointers of each node
Update the head and tail pointers accordingly
The error handling function copies elements from q2 back to q1 in case of an error.
Use q_len() to get the length of the queues
Use q_insert() and q_remove() to manipulate the queues
Iterate through q2 and use q_insert() to copy elements back to q1
Opening two serial port connections at a time is not possible due to hardware limitations.
Serial ports are physical interfaces that allow communication between a computer and external devices.
Each serial port has a unique identifier and can only be accessed by one application at a time.
Attempting to open two serial port connections simultaneously would result in conflicts and errors.
To overcome this limitation, you can...
To indicate error/failure in a function that returns a float, use a special value or an additional parameter.
Use a special value like NaN or a negative value to indicate error/failure.
Alternatively, add an additional parameter to the function to return an error code or message.
Handle the error/failure condition appropriately in the calling code.
The question is about synchronizing two threads to print odd and even numbers from 1 to 10.
Use synchronization mechanisms like locks or semaphores to ensure only one thread prints at a time
Create two separate functions for printing odd and even numbers
Use a shared variable to keep track of the current number being printed
Use a loop to iterate from 1 to 10 and call the appropriate function based on the current number
A binary search tree is a data structure where each node has at most two children, and the left child is smaller than the parent while the right child is larger.
The maximum height of a binary search tree with n elements is n-1.
The search complexity for the case when the height is maximum is O(n).
To reduce the search complexity, we can balance the binary search tree using techniques like AVL trees or Red-Black trees.
The throw() statement is internally implemented by creating an exception object and transferring control to the catch() block.
When a throw() statement is executed, an exception object is created.
The exception object contains information about the type of exception and any additional data.
The control is then transferred to the nearest catch() block that can handle the exception.
The catch() block can access the exception...
The output will be the size of the array in bytes, which is 40.
The 'sizeof' operator returns the size of a variable or data type in bytes.
In this case, 'sizeof(a)' will return the size of the array 'a' in bytes.
Since 'a' is an array of 10 integers, each taking 4 bytes, the total size will be 10 * 4 = 40 bytes.
Static functions in C/C++ are functions that can only be accessed within the same file they are defined in.
Static functions are declared using the 'static' keyword.
They cannot be called using an object or instance of a class.
They are useful for encapsulating functionality that is only relevant within a specific file.
Static functions can access only static variables and other static functions within the same file.
They a...
Code to delete a node from a singly linked list given the head and offset of the node.
Traverse the linked list until the node at the given offset is reached.
Update the next pointer of the previous node to skip the node to be deleted.
Free the memory occupied by the node to be deleted.
Adding two numbers represented as linked lists with different lengths.
Traverse both linked lists simultaneously, adding corresponding digits and carrying over the carry.
If one list is shorter, consider the remaining digits as 0.
Create a new linked list to store the result.
Handle the case when the sum of digits exceeds 9 by carrying over the digit to the next place value.
If there is a carry after adding all digits, add
Tries are tree-like data structures used for efficient retrieval of strings, commonly used in autocomplete and spell checking.
Tries are used to store and search for strings efficiently
Each node in a trie represents a character, forming a tree-like structure
Tries are commonly used in autocomplete and spell checking applications
They allow for fast prefix matching and searching for words
Locks are synchronization mechanisms used to control access to shared resources in multi-threaded environments.
Locks prevent multiple threads from accessing shared resources simultaneously.
They ensure that only one thread can access a shared resource at a time.
Locks help in preventing race conditions and maintaining data integrity.
They can be implemented using various techniques such as mutexes, semaphores, or monitors...
Static global variables are stored in the data segment of the program's memory. Function's static variables are also stored in the data segment.
Static global variables are allocated memory when the program starts and retain their values throughout the program's execution.
Function's static variables are local to the function but retain their values between function calls.
Both static global variables and function's stati...
Static variables are initialized to zero because it is a default value that ensures predictable behavior and avoids potential bugs.
Initializing static variables to zero provides a known starting point for calculations or comparisons.
Zero is a neutral value that does not affect the outcome of most operations.
Using a constant other than zero could introduce unexpected behavior or require additional handling.
For example, ...
Yes, a variable value can be assigned to a static variable during initialization.
Static variables are initialized only once, at the start of the program.
The value assigned to a static variable during initialization can be a constant or the result of an expression.
The assigned value can be changed later in the program, but it will retain its value between function calls.
Static variables are useful for preserving data ac
Paging is a memory management technique used in operating systems to efficiently manage memory resources.
Paging divides the physical memory into fixed-size blocks called pages.
Virtual memory is divided into fixed-size blocks called page frames.
When a process needs to access a memory location, the operating system maps the virtual address to a physical address using a page table.
Paging allows for efficient memory alloca...
Associative mapping is a cache mapping technique where a memory block can be placed in any cache location. Direct mapping is a technique where each memory block is mapped to a specific cache location. Set associative mapping is a combination of both.
Associative mapping allows flexibility in placing memory blocks in cache.
Direct mapping assigns a specific cache location for each memory block.
Set associative mapping comb...
No, paging cannot be implemented completely in the OS without paging hardware.
Paging is a hardware feature that allows the operating system to manage memory efficiently.
Without paging hardware, the OS would not have the necessary mechanisms to map virtual addresses to physical addresses.
Paging hardware includes components like the Memory Management Unit (MMU) and Translation Lookaside Buffer (TLB).
These hardware compon...
TLB stands for Translation Lookaside Buffer. It is a hardware cache that stores recently accessed virtual-to-physical memory translations.
TLB is a cache used in computer processors to improve memory access times.
It stores recently accessed virtual-to-physical memory translations.
TLB reduces the need to access the slower main memory for translation lookups.
TLB is an important component in virtual memory systems.
TLB entr...
A macro to add/multiply two numbers
Use the preprocessor directive #define to define the macro
For addition, use the + operator and for multiplication, use the * operator
Enclose the macro in parentheses to ensure correct evaluation of expressions
Example: #define ADD(x, y) ((x) + (y))
Example: #define MULTIPLY(x, y) ((x) * (y))
Test cases for adder function
Test with positive numbers
Test with negative numbers
Test with zero
Test with large numbers
Test with decimal numbers
Test with different data types
The size of the structure is 12 bytes. The members will be allocated memory based on their data types.
The structure 'abc' has three members: 'a' of type int, 'b' of type int, and 'c' of type char.
The size of int is typically 4 bytes and the size of char is typically 1 byte.
The total size of the structure is calculated by summing the sizes of its members.
In this case, 4 bytes for 'a', 4 bytes for 'b', and 1 byte for 'c'...
Yes, the size will change.
The size of the struct will change because the order of the members has changed.
The size of the struct will depend on the size of its members and any padding added by the compiler.
In this case, the size of the struct will likely increase due to the addition of the 'char c' member.
The size of struct abc will be 8 bytes. The members will be arranged in the order of declaration.
The struct abc has three members: int a, char b, and short c.
The size of int is typically 4 bytes, char is 1 byte, and short is 2 bytes.
The total size of the struct is the sum of the sizes of its members, which is 4 + 1 + 2 = 7 bytes.
However, due to memory alignment and padding, the size of the struct will be rounded up to ...
Padding is done to add extra space or characters to a data structure or field for various reasons.
Padding is done to align data structures in memory or disk storage.
It can be used to ensure proper memory alignment for efficient access and performance.
Padding can also be used for data integrity and security purposes.
The amount of padding and its placement is determined by the specific requirements of the data structure ...
The output will be 5.
Processor 1 initializes variable 'a' with a value of 10 and creates a pointer 'ptr' pointing to 'a'.
Processor 1 writes the value of 'ptr' into 'file1' and then sleeps for 10 seconds.
Processor 2 reads the contents of 'file1' and saves it in pointer 'p'.
Processor 2 assigns the value 5 to the memory location pointed by 'p'.
When Processor 1 wakes up and executes the printf statement, it will print the
A queue can be implemented using a stack by using two stacks and simulating the enqueue and dequeue operations.
Create two stacks, stack1 and stack2.
For enqueue operation, push the element onto stack1.
For dequeue operation, if stack2 is empty, pop all elements from stack1 and push them onto stack2. Then pop the top element from stack2.
This ensures that the first element pushed onto stack1 is the first element to be popp
To find a loop in a linked list, we can use the Floyd's cycle-finding algorithm.
Initialize two pointers, slow and fast, both pointing to the head of the linked list.
Move slow pointer by one step and fast pointer by two steps.
If there is a loop, the slow and fast pointers will eventually meet at the same node.
If the fast pointer reaches the end of the list (null), there is no loop.
A function to check whether a substring is present in a string.
Use the built-in string method 'includes()' to check if the substring is present in the string.
Return true if the substring is found, otherwise return false.
I applied via Company Website and was interviewed in May 2021. There was 1 interview round.
posted on 8 Mar 2024
I applied via Campus Placement
Test is for 3 hours including coding, mcq and aptitude.
I applied via Referral and was interviewed in Jul 2023. There were 2 interview rounds.
I applied via Referral and was interviewed in Aug 2022. There were 3 interview rounds.
Aluminium formwork is a construction technique that uses lightweight aluminium panels to form concrete walls, floors, and columns.
Aluminium formwork is a modern construction technique that is faster and more efficient than traditional formwork methods.
It involves using lightweight aluminium panels that are easy to handle and can be reused multiple times.
The panels are assembled on site to form the desired shape and siz...
Waterproofing procedure involves applying a waterproof barrier to prevent water from penetrating a building structure.
Identify the areas that need waterproofing such as roofs, walls, and foundations.
Choose the appropriate waterproofing material based on the type of structure and the level of water exposure.
Prepare the surface by cleaning and repairing any cracks or damage.
Apply the waterproofing material using the reco...
Steel Fibre Road Concrete is a type of concrete that contains steel fibres to improve its strength and durability.
Steel fibres are added to the concrete mix to enhance its mechanical properties.
The fibres act as reinforcement and help to prevent cracking and improve resistance to wear and tear.
Steel Fibre Road Concrete is commonly used in the construction of roads, bridges, and other infrastructure projects.
It is also ...
I have experience in piling works including design, installation, and testing of piles.
Designed pile foundations for various structures including bridges and buildings
Installed piles using various methods such as driven piles and drilled shafts
Conducted pile load tests to ensure the capacity of the piles
Managed and supervised piling works on construction sites
Ensured compliance with safety regulations and quality stand
Concrete technology is crucial for site activity as it involves the proper mixing, placing, and curing of concrete.
Understanding the properties of concrete and how it reacts to different conditions
Proper mixing of concrete ingredients to achieve the desired strength and consistency
Ensuring proper placement and compaction of concrete to avoid voids and weak spots
Proper curing of concrete to achieve maximum strength and ...
I completed various projects during my Bachelor's degree, including a design project for a new bridge and a research project on renewable energy.
Designed a new bridge using CAD software
Researched and implemented renewable energy sources on campus
Collaborated with classmates on a group project to improve campus sustainability
I completed my 6 months internship at ABC Engineering Firm, where I gained hands-on experience in project management and design.
Internship at ABC Engineering Firm
Focused on project management and design
Hands-on experience gained
I applied via Company Website and was interviewed in Feb 2023. There were 2 interview rounds.
The coefficient of cement is a measure of its ability to expand or contract due to changes in temperature or moisture.
The coefficient of cement is also known as the coefficient of thermal expansion.
It is an important factor to consider in construction projects to prevent cracking or damage to structures.
The coefficient of cement varies depending on the type and composition of the cement.
For example, Portland cement typ...
Escalation of materials refers to the process of increasing the priority or urgency of obtaining necessary materials for a project.
Escalation may occur when there are delays in the delivery of materials or when the demand for materials exceeds the supply.
Project managers may escalate materials by contacting suppliers to expedite delivery or by seeking alternative sources for the materials.
Escalation can impact project ...
I applied via Company Website and was interviewed before Jan 2023. There was 1 interview round.
Chiller efficiency is a measure of how well a chiller unit is able to cool a space while using the least amount of energy.
Chiller efficiency is typically measured by the Coefficient of Performance (COP), which is the ratio of cooling output to energy input.
Regular maintenance and cleaning of chiller components can improve efficiency.
Upgrading to a more energy-efficient chiller model can also increase efficiency.
Proper ...
Water cooled systems are generally more efficient than air cooled systems due to higher heat transfer capabilities.
Water has higher heat transfer capabilities compared to air
Water cooled systems can maintain more consistent temperatures
Water cooled systems are typically used in high performance applications such as data centers and industrial machinery
Duct velocity can be improved by increasing the fan speed or reducing the duct size.
Increase the fan speed to increase the air velocity in the duct.
Reduce the duct size to increase the air velocity.
Use dampers or adjustable louvers to control and optimize the airflow.
Ensure proper sealing of duct joints to minimize air leakage.
Consider using smooth and straight ducts to reduce friction and improve airflow.
Regularly cle...
The chiller system uses various types of gases for cooling purposes.
Common types of gases used in chiller systems include R-134a, R-410A, and ammonia.
R-134a is a hydrofluorocarbon (HFC) refrigerant commonly used in air conditioning systems.
R-410A is a blend of hydrofluorocarbons used as a replacement for older refrigerants.
Ammonia (NH3) is often used in industrial chiller systems due to its high cooling capacity.
Other ...
The VRF system capacity is determined based on the area's cooling and heating load requirements.
Calculate the total cooling load and heating load for the area
Consider factors such as insulation, windows, occupancy, and equipment
Select VRF system capacity based on the calculated load requirements
Consult with HVAC professionals for accurate sizing
I applied via Naukri.com and was interviewed in May 2023. There were 3 interview rounds.
Project refers to a specific task with a defined start and end, while project engineering involves the technical aspects of planning, designing, and executing the project.
Project is the overall task or objective to be completed within a specific timeframe.
Project engineering focuses on the technical aspects such as planning, designing, and executing the project.
Project management involves coordinating resources and tas...
Types of services in interior fitout include design, construction, project management, and installation.
Design services involve creating layouts, selecting materials, and creating 3D visualizations.
Construction services include building partitions, ceilings, and flooring.
Project management services involve coordinating schedules, budgets, and contractors.
Installation services include fitting furniture, fixtures, and eq...
Some common problems faced on site include delays in material delivery, inclement weather, and coordination issues.
Delays in material delivery can impact project timelines and budgets
Inclement weather can halt work progress and cause safety concerns
Coordination issues between different teams can lead to misunderstandings and errors
Agreement is a mutual understanding between parties, while a bond is a legal document that ensures fulfillment of obligations.
Agreement is a mutual understanding between two or more parties.
A bond is a legal document that guarantees the fulfillment of obligations.
Agreements are usually informal and may not always be legally binding.
Bonds are formal and legally enforceable documents.
Examples of agreements include contra...
Some of the top questions asked at the Marvel Realtors Software Engineer interview for freshers -
Project Manager
8
salaries
| ₹7.2 L/yr - ₹12.5 L/yr |
Senior Engineer
7
salaries
| ₹3.6 L/yr - ₹6.5 L/yr |
Assistant Engineer
6
salaries
| ₹2.2 L/yr - ₹4 L/yr |
Store Keeper
6
salaries
| ₹2.8 L/yr - ₹3.8 L/yr |
Executive Accountant
6
salaries
| ₹1.8 L/yr - ₹3.6 L/yr |
Knight Frank
R.S. Infraprojects
SMEC
BPTP