Qualcomm
20+ ONE BCG Interview Questions and Answers
Q1. Function to write data to some memory location which can dynamically allocate memory and return the address details where data is present .
Function to dynamically allocate memory and write data to a memory location, returning the address details.
Use malloc() or calloc() to dynamically allocate memory
Use memcpy() or strcpy() to write data to the allocated memory
Return the address details where data is present
Q2. Volatile usage w.r.t to gpio initialization, how volatile can help in overwriting compiler optimization.
Volatile keyword prevents compiler optimization by telling the compiler that the variable's value can change unexpectedly.
Volatile keyword is used to indicate that a variable may be changed unexpectedly, such as in the case of hardware registers.
When initializing GPIO pins, using volatile keyword ensures that the compiler does not optimize away the initialization code.
Without volatile keyword, the compiler may optimize out the GPIO initialization code if it thinks the value w...read more
Q3. Structure which can take input as 0 or 1 , based on the input traverse the linkedlist and return the decimal equivalent of the traversed data .
Traverse a linked list based on input 0 or 1 to return decimal equivalent.
Create a function that takes input 0 or 1 and traverses the linked list accordingly.
For each node in the linked list, multiply the current decimal value by 2 and add the data of the node if input is 1.
Return the final decimal value after traversing the linked list.
Q4. Mock code to initialize gpio using hal functions as well as write a function to set and clear gpio status .
Initialize and control GPIO using HAL functions in embedded systems.
Use HAL_GPIO_Init() function to initialize GPIO pins
Use HAL_GPIO_WritePin() function to set or clear GPIO status
Example: HAL_GPIO_Init(&GPIO_InitStruct)
Example: HAL_GPIO_WritePin(GPIOx, GPIO_PIN_x, GPIO_PIN_SET)
Q5. Program to find length of bits assigned in memory using recursion.
Program to find length of bits assigned in memory using recursion.
Define a recursive function to count the bits in memory
Base case: if input is 0, return 0
Recursive case: return 1 + function(input / 2)
Q6. Program to find the sum of all the digital in the number .
Program to find the sum of all the digits in a number.
Iterate through each digit in the number and add them together.
Convert the number to a string to easily access each digit.
Use modulo operator to extract each digit from the number.
Handle negative numbers by taking the absolute value before processing.
Q7. Create a linkedlist check if list is circular if not then reverse it .
Check if a linked list is circular, if not reverse it.
Create two pointers, one moving at double the speed of the other to detect a cycle
If a cycle is detected, the list is circular. If not, reverse the list by changing the pointers' directions
Q8. Memory Management and mapping in different scenarios.
Memory management involves allocating and deallocating memory efficiently, while mapping involves associating memory addresses with physical locations.
Memory management is crucial for optimizing performance and preventing memory leaks.
Mapping involves translating virtual memory addresses to physical memory locations.
Different scenarios may require different memory management strategies, such as stack allocation vs heap allocation.
Examples include paging in virtual memory syst...read more
Q9. Find the length of longest common subsequence in given strings.
The length of the longest common subsequence in given strings is found using dynamic programming.
Use dynamic programming to find the length of the longest common subsequence.
Compare characters of the strings and build a matrix to store the lengths of common subsequences.
Traverse the matrix to find the length of the longest common subsequence.
Q10. Write a shell script based on different different scenarios
Shell script to handle different scenarios
Use conditional statements like if-else to handle different scenarios
Utilize loops for repetitive tasks
Implement error handling to address unexpected situations
Q11. Explain static const usage with an example .
static const is used to declare constants that are known at compile time and cannot be modified
static const int MAX_SIZE = 100; // declaring a constant integer
static const double PI = 3.14159; // declaring a constant double
static const char* MESSAGE = "Hello, World!"; // declaring a constant string
Q12. Define Architecture to process real-time data .
Architecture to process real-time data involves designing systems that can efficiently collect, process, and analyze data in real-time.
Utilize distributed systems to handle high volumes of data in real-time
Implement stream processing frameworks like Apache Kafka or Apache Flink
Use microservices architecture for scalability and flexibility
Employ in-memory databases for fast data retrieval
Ensure fault tolerance and data consistency in the architecture
Q13. What is android boot up sequence
Android boot up sequence involves several stages including power on, bootloader, kernel initialization, and system initialization.
Power on the device
Bootloader loads the kernel
Kernel initializes the system
System initialization completes the boot up process
Q14. What is VLSI design cycle ?
VLSI design cycle is the process of creating integrated circuits by going through various stages from design to fabrication.
VLSI design cycle involves stages like specification, design, verification, synthesis, and fabrication.
It starts with defining the requirements and specifications of the integrated circuit.
Design phase includes logic design, circuit design, and physical design.
Verification ensures that the design meets the specified requirements.
Synthesis involves conver...read more
Q15. what is virtual function?
A virtual function is a function in a base class that is declared using the keyword 'virtual' and can be overridden by a function in a derived class.
Virtual functions allow a derived class to provide a specific implementation of a function that is already defined in a base class.
They enable polymorphism, where a pointer to a base class can be used to call a function in a derived class.
Virtual functions are used in object-oriented programming to achieve runtime polymorphism.
Q16. Union usage for bit assignments.
Unions in C/C++ can be used for bit assignments by allowing multiple variables to share the same memory location.
Unions allow different data types to be stored in the same memory location, which can be useful for bit manipulation.
By defining a union with multiple variables of different data types, you can access the same memory location using different variable names.
For example, you can use a union to access individual bits of an integer by defining a struct with bit fields ...read more
Q17. Various data filtering techniques.
Various data filtering techniques include sorting, grouping, aggregating, and applying filters based on specific criteria.
Sorting: arranging data in a specific order, such as ascending or descending
Grouping: categorizing data into distinct groups based on common attributes
Aggregating: combining multiple data points into a single value, such as summing or averaging
Filtering: selecting only the data that meets certain criteria, such as date range or value threshold
Q18. What is inheritance
Inheritance is a concept in object-oriented programming where a class inherits properties and behaviors from another class.
Allows for code reusability by creating a new class based on an existing class
Derived class (subclass) inherits attributes and methods from a base class (superclass)
Can have multiple levels of inheritance (multi-level inheritance)
Example: Animal class can be a base class with properties like name and age, and Dog class can inherit from Animal class with a...read more
Q19. what is polymorphism
Polymorphism is the ability of a single function or method to operate on different types of data.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
It enables a single interface to be used for different data types.
Examples include method overloading and method overriding in object-oriented programming.
Q20. detect and remove loop in ll
To detect and remove a loop in a linked list, we can use Floyd's Cycle Detection Algorithm.
Use two pointers, slow and fast, to traverse the linked list
If there is a loop, the fast pointer will eventually meet the slow pointer
Once the loop is detected, reset one of the pointers to the head and move both pointers at the same pace until they meet again to find the start of the loop
Q21. Explain CAP theorem.
CAP theorem states that in a distributed system, it is impossible to simultaneously guarantee consistency, availability, and partition tolerance.
Consistency: All nodes in the system have the same data at the same time.
Availability: Every request gets a response, even if some nodes are down.
Partition Tolerance: The system continues to operate despite network partitions.
In a distributed system, you can only achieve two out of the three properties at any given time.
Examples: Goo...read more
Q22. Working of docker
Docker is a platform for developing, shipping, and running applications using containerization.
Docker allows applications to be packaged into containers, which include all dependencies needed to run.
Containers are lightweight, portable, and isolated environments that can run on any system with Docker installed.
Docker uses a client-server architecture with a daemon process managing containers.
Docker images are used to create containers, and can be shared and reused through Doc...read more
More about working at Qualcomm
Interview Process at ONE BCG
Top Senior Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month