Add office photos
Samsung logo
Employer?
Claim Account for FREE

Samsung

3.9
based on 7.2k Reviews
Video summary
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
Designation
Fresher
Experienced
Skills

300+ Samsung Interview Questions and Answers

Updated 19 Feb 2025
Popular Designations

Q101. Longest Substring Without Repeating Characters Problem Statement

Given a string S of length L, determine the length of the longest substring that contains no repeating characters.

Example:

Input:
"abacb"
Output...read more
Ans.

Find the length of the longest substring without repeating characters in a given string.

  • Use a sliding window approach to keep track of the longest substring without repeating characters.

  • Use a hashmap to store the index of each character in the string.

  • Update the start index of the window when a repeating character is encountered.

  • Calculate the maximum length of the window as you iterate through the string.

  • Return the maximum length as the result.

Add your answer
right arrow

Q102. A program to tell if a knight on a chessboard at a given location can reach another location in <= a given number of moves

Ans.

Program to check if a knight on a chessboard can reach another location in <= given moves

  • Create a function that takes the starting and ending positions of the knight and the maximum number of moves allowed

  • Use a breadth-first search algorithm to explore all possible moves of the knight within the given number of moves

  • If the ending position is reached within the given number of moves, return true, else return false

View 1 answer
right arrow
Samsung Interview Questions and Answers for Freshers
illustration image
Q103. The Longest Increasing Subsequence (LIS) problem is to find the length of the longest subsequence of a given sequence such that all elements of the subsequence are sorted in increasing order.
Ans.

The Longest Increasing Subsequence (LIS) problem is to find the length of the longest subsequence of a given sequence with increasing order.

  • Use dynamic programming to solve the LIS problem efficiently.

  • Maintain an array to store the length of the LIS ending at each element.

  • Iterate through the array and update the LIS length based on previous elements.

  • Example: For input [10, 22, 9, 33, 21, 50, 41, 60, 80], the LIS is [10, 22, 33, 50, 60, 80] with length 6.

Add your answer
right arrow

Q104. What are the cases in which you analyze the thread dump?

Ans.

Thread dumps are analyzed to identify performance bottlenecks and deadlocks in the application.

  • To identify the root cause of performance issues

  • To identify deadlocks and thread contention issues

  • To identify long running threads and blocked threads

  • To identify memory leaks and excessive CPU usage

  • To identify issues related to garbage collection

  • To identify issues related to database connections and transactions

Add your answer
right arrow
Discover Samsung interview dos and don'ts from real experiences

Q105. puzzle-There are 1000 wine bottles. One of the bottles contains poisoned wine. A rat dies after one hour of drinking the poisoned wine. How many minimum rats are needed to figure out which bottle contains poiso...

read more
Ans.

At least 10 rats are needed to figure out which bottle contains poison in an hour.

  • Number the bottles from 1 to 1000.

  • Use binary representation of the bottle numbers to assign each rat a unique combination of bottles to drink.

  • For example, Rat 1 drinks from all bottles with a binary representation that has a 1 in the least significant bit (LSB).

  • After an hour, the rats that die will indicate the binary representation of the poisoned bottle.

  • By decoding the binary representation, t...read more

Add your answer
right arrow

Q106. Write a C program that will COMPILE and RUN to reverse a string in-place

Ans.

C program to reverse a string in-place

  • Use two pointers, one at the beginning and one at the end of the string

  • Swap the characters at the two pointers and move the pointers towards each other until they meet

  • Handle odd-length strings by leaving the middle character in place

Add your answer
right arrow
Are these interview questions helpful?

Q107. Can you reinitialize the virtual users if they directly go to the error state and it has consumable data?

Ans.

Yes, virtual users can be reinitialized if they go to error state with consumable data.

  • Reinitializing virtual users can help in identifying the root cause of the error.

  • It is important to ensure that the consumable data is backed up before reinitializing the virtual users.

  • Reinitializing virtual users should be done only after analyzing the error and identifying the cause.

  • It is important to have a backup plan in case reinitializing the virtual users does not resolve the error.

Add your answer
right arrow

Q108. What is context switching, and parsing in the database, and how does it impact the performance of the DB server?

Ans.

Context switching and parsing are database operations that impact DB server performance.

  • Context switching is the process of switching between different tasks or threads in a CPU.

  • Parsing is the process of analyzing and interpreting data in a database.

  • Both operations require CPU resources and can cause delays in processing other tasks.

  • Context switching can be reduced by optimizing code and minimizing the number of threads.

  • Parsing can be improved by using efficient algorithms an...read more

Add your answer
right arrow
Share interview questions and help millions of jobseekers 🌟
man with laptop

Q109. What is the difference between malloc and new and which one is faster and why?

Ans.

malloc and new are used to allocate memory dynamically. Malloc is faster but new is safer.

  • malloc is a C function while new is a C++ operator

  • malloc only allocates memory while new also initializes the memory

  • new throws an exception if allocation fails while malloc returns NULL

  • malloc is faster because it does not involve constructor calls

  • new is safer because it ensures type safety and prevents memory leaks

Add your answer
right arrow

Q110. there three files f1.c, f2.c, f3.c.. in f1.c int a is declared, in f2.c static int b are declared.. what are the variables that can be accessed from files f1.c and f2.c in f3.c ... If variable 'a' has to be acc...

read more
Ans.

Variables accessible from f1.c and f2.c in f3.c. 'a' needs to be declared as extern to be accessed.

  • Variables declared as static in f2.c can only be accessed within f2.c

  • Variables declared in f1.c can be accessed in f3.c by declaring them as extern

  • Variables declared in f3.c cannot be accessed in f1.c or f2.c

Add your answer
right arrow

Q111. Remove Duplicates from String Problem Statement

You are provided a string STR of length N, consisting solely of lowercase English letters.

Your task is to remove all duplicate occurrences of characters in the s...read more

Ans.

Remove duplicate occurrences of characters in a given string.

  • Use a hash set to keep track of characters seen so far.

  • Iterate through the string and add non-duplicate characters to a new string.

  • Return the new string as the result.

Add your answer
right arrow
Q112. How do you perform a spiral order traversal of a binary tree? Please provide an explanation or code to print the binary tree in spiral order.
Ans.

Spiral order traversal of a binary tree involves printing nodes level by level alternating between left to right and right to left.

  • Start by pushing the root node into a queue.

  • While the queue is not empty, pop a node, print its value, and push its children into the queue.

  • For each level, alternate between printing nodes from left to right and right to left.

  • Repeat until all nodes are printed in spiral order.

Add your answer
right arrow

Q113. Difference between structure and union and what are the pros and cons of both?

Ans.

Structure and union are data structures in C language. Union stores only one value at a time while structure stores multiple values.

  • Structure is used to store different data types while union is used to store only one data type at a time.

  • Structure allocates memory for all its members while union allocates memory for only the largest member.

  • Structure is used when we want to store multiple values of different data types while union is used when we want to store only one value a...read more

Add your answer
right arrow
Q114. You have two wires of different lengths that are both capable of burning for exactly one hour when ignited at both ends. How can you measure a time interval of 45 minutes using these two wires?
Ans.

Use one wire to measure 30 minutes, then ignite the other wire at one end to measure the remaining 15 minutes.

  • Ignite one wire at both ends and the other wire at one end simultaneously

  • After 30 minutes, the first wire will burn out completely

  • At this point, ignite the other end of the second wire

  • The second wire will burn for another 15 minutes before burning out completely

Add your answer
right arrow

Q115. How do we know the linked list is a circular or not?

Ans.

To check if a linked list is circular, we can use Floyd's cycle-finding algorithm.

  • Floyd's cycle-finding algorithm uses two pointers, one moving at twice the speed of the other.

  • If the linked list is circular, the fast pointer will eventually catch up to the slow pointer.

  • If the linked list is not circular, the fast pointer will reach the end of the list and the algorithm will terminate.

Add your answer
right arrow

Q116. What is the structure byte padding and how does it form and depend? Is there any concept

Ans.

Structure byte padding is the insertion of unused bytes between structure members to align them in memory.

  • Padding is added to ensure that each member of a structure is aligned on a memory boundary that is a multiple of its size.

  • The amount of padding added depends on the size and alignment requirements of the members.

  • Padding can affect the size of a structure and the performance of code that uses it.

  • For example, a structure with a 4-byte member followed by a 1-byte member will...read more

Add your answer
right arrow

Q117. Can you say about the priority of mobile application which one is having higher priority?

Ans.

The priority of a mobile application depends on the business goals and user needs.

  • The priority of a mobile application can vary depending on the business goals and user needs.

  • For example, a mobile banking app may have a higher priority than a social media app for a bank.

  • On the other hand, a social media app may have a higher priority for a media company.

  • The priority can also depend on the target audience and the market demand.

  • It is important to prioritize features and functio...read more

Add your answer
right arrow
Q118. What is the difference between a structure and a union, and what are the pros and cons of both?
Ans.

Structure and union are both used to group different data types, but structure allocates memory for each member separately while union shares the same memory space for all members.

  • Structure allocates memory for each member separately, while union shares the same memory space for all members.

  • Structures are used when each member needs its own memory space and unions are used when only one member is accessed at a time.

  • Structures are typically larger in size compared to unions be...read more

Add your answer
right arrow

Q119. What is FPGA and what are its advantages?

Ans.

FPGA stands for Field Programmable Gate Array. It is a type of integrated circuit that can be programmed after manufacturing.

  • FPGAs offer flexibility and can be reprogrammed for different applications

  • They can be used to accelerate certain tasks such as image processing or cryptography

  • FPGAs can be more power-efficient than traditional CPUs for certain applications

  • Examples of FPGA manufacturers include Xilinx and Intel (formerly Altera)

Add your answer
right arrow

Q120. What are storage classes in C?Explain

Ans.

Storage classes in C define the scope and lifetime of variables.

  • There are four storage classes in C: auto, register, static, and extern.

  • Auto variables are local to a block and have automatic storage duration.

  • Register variables are stored in CPU registers for faster access.

  • Static variables have a lifetime throughout the program and are initialized only once.

  • Extern variables are declared outside any function and can be accessed by any function in the program.

Add your answer
right arrow

Q121. What is the self referential structure, write an example of self referential structure?

Ans.

Self referential structure is a structure that contains a pointer to the same type of structure.

  • It allows a structure to reference itself within its own definition.

  • It is commonly used in linked lists, trees, and graphs.

  • Example: struct Node { int data; struct Node *next; };

  • Here, the Node structure contains a pointer to another Node structure.

Add your answer
right arrow

Q122. How to set the priority of any process in windows and in linux?

Ans.

To set process priority in Windows and Linux, use task manager and nice command respectively.

  • In Windows, open task manager, right-click on the process and select 'Set Priority'

  • In Linux, use the 'nice' command followed by the process name or ID and the priority level (values range from -20 to 19)

  • Higher priority levels mean the process will get more CPU time

  • Examples: 'nice -n 10 firefox' sets Firefox priority to 10 in Linux, 'Set Priority' in task manager allows setting priorit...read more

Add your answer
right arrow

Q123. A piece of plain paper is torn into random number of pieces and how do you construct back the original paper?

Ans.

Use jigsaw puzzle approach to reconstruct the paper.

  • Sort the pieces by edges and corners.

  • Identify patterns and colors to match adjacent pieces.

  • Use trial and error method to fit the pieces together.

  • Check for completeness and accuracy of the final paper.

  • Use computer vision and machine learning algorithms for automation.

Add your answer
right arrow
Q124. What is the difference between a structure and a union, and what are the pros and cons of each?
Ans.

Structure and union are both used to group different data types, but structure allocates memory for each member separately while union shares the same memory location for all members.

  • Structure allocates memory for each member separately, while union shares the same memory location for all members.

  • Structures are used when each member needs its own memory space, while unions are used when only one member is accessed at a time.

  • Structures are typically larger in size compared to ...read more

Add your answer
right arrow

Q125. How to generate heap dump and thread dump for Unix and Linux systems?

Ans.

Generating heap dump and thread dump on Unix/Linux systems

  • For heap dump: use jmap command with -dump option

  • For thread dump: use jstack command

  • Heap dump can also be generated using kill -3

  • Thread dump can also be generated using kill -QUIT

Add your answer
right arrow

Q126. What are the various thread states found in the thread dump?

Ans.

Thread states in thread dump include NEW, RUNNABLE, BLOCKED, WAITING, TIMED_WAITING, and TERMINATED.

  • NEW: thread has been created but not yet started

  • RUNNABLE: thread is executing or ready to execute

  • BLOCKED: thread is blocked waiting for a monitor lock

  • WAITING: thread is waiting indefinitely for another thread to perform a particular action

  • TIMED_WAITING: thread is waiting for another thread to perform a particular action for a specified period of time

  • TERMINATED: thread has compl...read more

Add your answer
right arrow

Q127. which is faster x++ or ++x and why?

Ans.

++x is faster than x++ because it increments the value before using it.

  • ++x increments the value before using it, while x++ increments the value after using it.

  • ++x is faster because it saves the overhead of creating a temporary variable.

  • In some cases, the difference in speed may be negligible and the choice between the two may depend on readability and coding standards.

Add your answer
right arrow

Q128. What is the difference between these two statement: const int *p; int const *p;

Ans.

The two statements are equivalent and declare a pointer to a constant integer.

  • Both statements declare a pointer to an integer that cannot be modified through the pointer.

  • The 'const' keyword can be placed before or after the 'int' keyword.

  • The pointer itself can still be modified to point to a different integer.

  • Example: const int *p; and int const *p; both declare a pointer to a constant integer.

Add your answer
right arrow

Q129. What is feedback in amplifiers? What are the types of feedback?

Ans.

Feedback in amplifiers is a process of returning a portion of the output signal back to the input.

  • Feedback helps to improve the performance of amplifiers by reducing distortion and increasing stability.

  • There are two types of feedback: positive and negative.

  • Positive feedback increases the gain of the amplifier, while negative feedback decreases the gain.

  • Negative feedback is commonly used in amplifiers to improve linearity and reduce distortion.

  • Positive feedback is used in osci...read more

Add your answer
right arrow

Q130. Derive the current equation of MOS transistor current equations?Both saturation and linear regions!

Ans.

The current equation of a MOS transistor describes its behavior in both saturation and linear regions.

  • The current equation in saturation region is given by Ids = 0.5 * k * (Vgs - Vth)^2

  • The current equation in linear region is given by Ids = k * ((Vgs - Vth) * Vds - 0.5 * Vds^2)

  • Ids represents the drain current, Vgs is the gate-to-source voltage, Vth is the threshold voltage, Vds is the drain-to-source voltage, and k is a constant

  • In saturation region, the drain current is quadr...read more

Add your answer
right arrow

Q131. Consider we have large amount of physical memory.Do we still need virtual memory? What is the use of paging in that situation

Ans.

Virtual memory is still needed even with large physical memory. Paging helps manage memory efficiently.

  • Virtual memory allows for larger programs to run than physical memory can handle

  • Paging helps manage memory efficiently by swapping out unused pages to disk

  • Virtual memory also allows for memory protection and sharing between processes

  • Examples of programs that require virtual memory include video editing software and large databases

Add your answer
right arrow

Q132. Write a program to insert a node in linked list

Ans.

Program to insert a node in linked list

  • Create a new node with the given data

  • Set the next pointer of the new node to the next pointer of the previous node

  • Set the next pointer of the previous node to the new node

Add your answer
right arrow

Q133. what is virtual function?what is virtual function table?what is virtual pointer? what is the size of virtual pointer(vptr)?

Ans.

Virtual functions are functions that can be overridden in derived classes. Virtual function table stores the addresses of these functions.

  • Virtual functions allow polymorphism and dynamic binding

  • Virtual function table is a lookup table of function pointers

  • Virtual pointer points to the virtual function table

  • Size of virtual pointer depends on the architecture of the system

Add your answer
right arrow
Q134. What is meant by multitasking and multithreading in operating systems?
Ans.

Multitasking refers to the ability of an operating system to run multiple tasks concurrently, while multithreading involves executing multiple threads within a single process.

  • Multitasking allows multiple processes to run simultaneously on a single processor, switching between them quickly.

  • Multithreading enables a single process to execute multiple threads concurrently, sharing resources like memory and CPU.

  • Multitasking improves system efficiency by utilizing idle CPU time, wh...read more

Add your answer
right arrow

Q135. You are given a string and a number.Count the no of ‘-’ characters in the string and return 1 if the count is equal to the number given or else return 0

Ans.

Count the number of '-' characters in a string and return 1 if it matches the given number, else return 0.

  • Use a loop to iterate through each character in the string and count the number of '-' characters.

  • Compare the count with the given number and return 1 if they match, else return 0.

  • Handle edge cases such as empty string or negative number input.

Add your answer
right arrow

Q136. Differences between Mutex and Semaphore. Why do we need Mutex if we have Semaphores

Ans.

Mutex and Semaphore are synchronization primitives used in multi-threaded environments.

  • Mutex is used to provide mutual exclusion to a shared resource, allowing only one thread to access it at a time.

  • Semaphore is used to control access to a shared resource, allowing multiple threads to access it at a time.

  • Mutex is binary, meaning it has only two states - locked and unlocked, while Semaphore can have multiple states.

  • Mutex is typically faster and simpler to use than Semaphore.

  • We...read more

Add your answer
right arrow
Q137. What is the difference between Early Binding and Late Binding in C++?
Ans.

Early binding is resolved at compile time while late binding is resolved at runtime in C++.

  • Early binding is also known as static binding, where the function call is resolved at compile time based on the type of the object.

  • Late binding is also known as dynamic binding, where the function call is resolved at runtime based on the actual type of the object.

  • Early binding is faster as the function call is directly linked to the function address during compilation.

  • Late binding allow...read more

Add your answer
right arrow
Q138. What is the Diamond Problem in C++ and how can it be resolved?
Ans.

Diamond Problem is a multiple inheritance issue in C++ where a class inherits from two classes that have a common base class.

  • Diamond Problem occurs when a class inherits from two classes that have a common base class, leading to ambiguity in accessing members.

  • It can be resolved in C++ using virtual inheritance, where the common base class is inherited virtually to avoid duplicate copies of base class members.

  • Example: class A is inherited by classes B and C, and class D inheri...read more

Add your answer
right arrow
Q139. What can you tell me about virtual memory and cache implementation?
Ans.

Virtual memory allows the operating system to use a combination of RAM and disk space to simulate more memory than is physically available. Cache implementation involves storing frequently accessed data in a smaller, faster memory for quicker access.

  • Virtual memory allows programs to use more memory than physically available by swapping data between RAM and disk.

  • Cache implementation involves storing frequently accessed data in a smaller, faster memory for quicker access.

  • Exampl...read more

Add your answer
right arrow
Q140. Implement the Depth First Search (DFS) algorithm for a graph.
Ans.

DFS is a graph traversal algorithm that explores as far as possible along each branch before backtracking.

  • Start at a node and explore as far as possible along each branch before backtracking

  • Use a stack to keep track of nodes to visit

  • Mark visited nodes to avoid revisiting them

  • Recursive implementation is common

Add your answer
right arrow

Q141. Is there any ideal CPU scheduling possible? Justify your answer?

Ans.

No, there is no ideal CPU scheduling possible.

  • CPU scheduling is a complex problem with many variables.

  • Different scheduling algorithms are suited for different scenarios.

  • The ideal scheduling algorithm would depend on the specific system and workload.

  • For example, a real-time system would require a different scheduling algorithm than a batch processing system.

Add your answer
right arrow

Q142. Write a program to find loop in linked list

Ans.

Program to find loop in linked list

  • Use two pointers, slow and fast, to traverse the linked list

  • If there is a loop, the fast pointer will eventually catch up to the slow pointer

  • To find the start of the loop, reset the slow pointer to the head and move both pointers at the same pace

Add your answer
right arrow

Q143. Difference between extern and static and give an example to justify?

Ans.

extern and static are storage classes in C programming language.

  • extern is used to declare a variable or function that is defined in another file or module.

  • static is used to declare a variable or function that is local to a file or module.

  • Example of extern: extern int count; //declares count variable defined in another file.

  • Example of static: static int count = 0; //declares count variable local to the file.

Add your answer
right arrow
Q144. What are the differences between a mutex and a semaphore?
Ans.

Mutex is used for exclusive access to a resource by only one thread at a time, while semaphore can allow multiple threads to access a resource simultaneously.

  • Mutex is binary semaphore with ownership, used for mutual exclusion.

  • Mutex is typically used to protect critical sections of code.

  • Semaphore is a signaling mechanism, used for synchronization between multiple threads.

  • Semaphore can have a count greater than 1, allowing multiple threads to access a resource.

  • Example: Mutex is...read more

Add your answer
right arrow

Q145. what is a semaphore? what is a mutex? what are message queues? what are the different types of inter process communications?

Ans.

Semaphore, mutex, message queues are inter-process communication mechanisms. Semaphores and mutexes are used for synchronization.

  • Semaphore is a signaling mechanism used to control access to a shared resource.

  • Mutex is a locking mechanism used to ensure mutual exclusion of shared resources.

  • Message queues are used for exchanging messages between processes.

  • Other types of inter-process communication include pipes, sockets, and shared memory.

  • Semaphores and mutexes are used for sync...read more

Add your answer
right arrow
Q146. Can you describe the four pillars of Object-Oriented Programming (OOP)?
Ans.

The four pillars of OOP are encapsulation, inheritance, polymorphism, and abstraction.

  • Encapsulation: Bundling data and methods that operate on the data into a single unit.

  • Inheritance: Allowing a new class to inherit properties and behaviors from an existing class.

  • Polymorphism: The ability for objects of different classes to respond to the same message in different ways.

  • Abstraction: Hiding the complex implementation details and showing only the necessary features of an object.

Add your answer
right arrow

Q147. Implementation of stacks with queues and vice versa

Ans.

Stacks can be implemented using two queues, while queues can be implemented using two stacks.

  • To implement a stack using queues, we can use one queue for storing elements and another temporary queue for operations.

  • To push an element onto the stack, we enqueue it to the temporary queue, then enqueue all elements from the main queue to the temporary queue, and finally swap the names of the two queues.

  • To pop an element from the stack, we dequeue an element from the main queue.

  • To ...read more

Add your answer
right arrow

Q148. which two things required in Sales?

Ans.

Two things required in Sales are communication skills and product knowledge.

  • Effective communication skills to understand customer needs and persuade them to buy

  • In-depth knowledge of the product or service being sold to answer customer questions and provide solutions

View 3 more answers
right arrow

Q149. Which is the best sorting algorithm ( considering all the aspects of time as well as space) ?

Ans.

It depends on the specific use case and input size.

  • For small input sizes, simple algorithms like insertion sort or selection sort may be sufficient.

  • For larger input sizes, more complex algorithms like merge sort or quicksort may be more efficient.

  • For nearly sorted input, insertion sort may be the fastest.

  • For input with many duplicates, counting sort or radix sort may be the best choice.

  • For input with a known range, bucket sort may be the most efficient.

  • Overall, there is no on...read more

Add your answer
right arrow

Q150. wat is a null object? is it conceptual?

Ans.

A null object is an object that does not have a value or reference to any object.

  • A null object is different from an object with a value of zero or an empty string.

  • It is often used to represent the absence of an object or value.

  • Null objects can be used to avoid null pointer exceptions in programming.

  • It is a conceptual idea in programming and computer science.

Add your answer
right arrow

Q151. What are its features?Explain

Ans.

Which software are you referring to?

  • Please specify the software you are asking about

  • Without context, it is impossible to answer this question

Add your answer
right arrow

Q152. What are virtual functions?

Ans.

Virtual functions are functions that can be overridden by derived classes.

  • Virtual functions are declared in a base class and can be overridden in a derived class.

  • They allow for polymorphism, where a derived class can be treated as its base class.

  • Virtual functions are called based on the actual object type, not the pointer or reference type.

  • They are declared using the 'virtual' keyword in the base class and optionally overridden using the 'override' keyword in the derived clas...read more

Add your answer
right arrow

Q153. what is the use of 'friend' access specifier in c++? ( redundancy)

Ans.

The 'friend' access specifier in C++ allows a non-member function or class to access private and protected members of a class.

  • The 'friend' keyword is used to declare a function or class as a friend of a class.

  • A friend function can access private and protected members of the class it is declared as a friend of.

  • A friend class can access private and protected members of the class it is declared as a friend of.

  • The 'friend' keyword does not affect the access specifiers of the clas...read more

Add your answer
right arrow
Q154. Can you write code for a singleton class?
Ans.

Yes, a singleton class is a class that can only have one instance created.

  • Ensure the constructor is private to prevent external instantiation.

  • Provide a static method to access the single instance.

  • Use a static variable to hold the single instance.

  • Example: class Singleton { private static Singleton instance = new Singleton(); private Singleton(){} public static Singleton getInstance() { return instance; }}

Add your answer
right arrow

Q155. What is bfs , and solve given problem with it? What is copy constructer? Kubernetes? Docker? Socket? Tcp/up?

Ans.

Answering questions related to bfs, copy constructor, Kubernetes, Docker, Socket, TCP/UP

  • BFS stands for Breadth First Search, a graph traversal algorithm

  • Copy constructor is a special constructor that creates a new object as a copy of an existing object

  • Kubernetes is an open-source container orchestration platform

  • Docker is a platform for developing, shipping, and running applications in containers

  • Socket is a software endpoint that establishes a bidirectional communication link b...read more

Add your answer
right arrow

Q156. What is the difference between task &amp; process ?

Add your answer
right arrow

Q157. What tools did you use for DB server tuning?

Ans.

I have used various tools for DB server tuning such as SQL Profiler, SQL Server Management Studio, and Database Engine Tuning Advisor.

  • SQL Profiler for monitoring and analyzing SQL Server activity

  • SQL Server Management Studio for managing and configuring SQL Server instances

  • Database Engine Tuning Advisor for analyzing workload and recommending index and partitioning strategies

Add your answer
right arrow

Q158. int a=5; int *p=&amp;a; ++(*p); what is the result of the above piece code?

Ans.

The value of variable 'a' will be incremented by 1.

  • The variable 'a' is initialized with value 5.

  • A pointer 'p' is created and assigned the address of 'a'.

  • The value pointed by 'p' is incremented by 1 using prefix increment operator.

  • The final value of 'a' will be 6.

Add your answer
right arrow

Q159. class A{ static int a; } How to initialise that?(static A:: int a=0;)

Ans.

To initialize static variable a in class A, use static A::int a = 0;

  • Use the class name followed by the scope resolution operator(::)

  • Assign the value to the static variable

  • Initialization should be done outside the class definition

Add your answer
right arrow

Q160. Explain the concept of virtual addressing and the allocation of virtual addresses during the execution of program

Ans.

Virtual addressing is a memory management technique that allows a process to use a range of memory addresses independent of physical memory.

  • Virtual addresses are mapped to physical addresses by the memory management unit (MMU)

  • Virtual addresses are allocated to a process during its execution

  • Virtual addressing allows for efficient use of physical memory by allowing multiple processes to share the same physical memory

  • Examples of virtual addressing include paging and segmentation

Add your answer
right arrow

Q161. What is web service and types of web services and advantage and disadvantage?

Ans.

Web service is a software system designed to support interoperable machine-to-machine interaction over a network.

  • Types of web services: SOAP, REST, XML-RPC, JSON-RPC

  • Advantages: interoperability, platform independence, reusability, scalability

  • Disadvantages: security concerns, performance issues, complexity

  • Example: Amazon Web Services (AWS), Google Cloud Platform (GCP), Microsoft Azure

Add your answer
right arrow

Q162. write code for fibonacci series nth term.... Implement strcat, strlen , strcpy without using predefined functions

Ans.

Code for Fibonacci series nth term and implement strcat, strlen, strcpy without using predefined functions.

  • For Fibonacci series, use a loop to calculate the nth term by adding the previous two terms.

  • For strcat, use a loop to append the second string to the end of the first string.

  • For strlen, use a loop to count the number of characters in the string.

  • For strcpy, use a loop to copy each character from the source string to the destination string.

Add your answer
right arrow

Q163. Can constant and volatile both be used at same time?

Ans.

Yes, constant and volatile can be used together.

  • Constant variables are read-only and cannot be modified.

  • Volatile variables are used to indicate that the value may change unexpectedly.

  • Using both together can be useful in multi-threaded environments.

  • For example, a constant pointer to a volatile variable can be used to ensure thread safety.

Add your answer
right arrow

Q164. What is the name full name of Ram?

Ans.

Ram is a common name in India and can refer to many people. It is not possible to determine the full name of Ram without additional context.

  • Ram is a common first name in India

  • There are many people with the first name Ram, so the full name would depend on the individual

  • Some common full names for Ram include Ramakrishna, Ramachandra, and Ramakant

View 2 more answers
right arrow

Q165. Difference between formula and a function

Ans.

Formula is a mathematical expression while function is a pre-built formula that performs a specific task.

  • Formula is a combination of mathematical operators and values used to calculate a result.

  • Function is a pre-built formula that performs a specific task, such as finding the average of a range of numbers.

  • Formulas can be customized and modified, while functions are fixed and cannot be changed.

  • Examples of functions include SUM, AVERAGE, MAX, MIN, etc.

Add your answer
right arrow

Q166. What is the real time operating system?

Ans.

A real-time operating system is an OS that processes data and events as they occur, without delay.

  • Real-time operating systems are used in applications that require immediate response, such as aviation, medical equipment, and industrial control systems.

  • They prioritize tasks based on their urgency and importance, and can handle multiple tasks simultaneously.

  • Examples of real-time operating systems include VxWorks, QNX, and FreeRTOS.

Add your answer
right arrow

Q167. what is the advantage and disadvantage of threads?(deadlock)

Ans.

Threads provide concurrency but can lead to deadlocks.

  • Advantage: Allows for concurrent execution of multiple tasks.

  • Disadvantage: Can lead to deadlocks where two or more threads are blocked and unable to proceed.

  • Example: A web server handling multiple requests concurrently using threads.

  • Example: A program with multiple threads accessing shared resources without proper synchronization.

  • Example: A program with multiple threads waiting for each other to release a resource, causing...read more

Add your answer
right arrow

Q168. Write a program to find the duplicate in the array(only one duplicate is present in the array)?

Ans.

Program to find the only duplicate in an array

  • Create a hash set to store elements as they are encountered

  • If an element is already in the hash set, it is a duplicate

  • Return the duplicate element

Add your answer
right arrow

Q169. Difference between monolithic and microservices architecture.

Ans.

Monolithic architecture is a single, self-contained unit while microservices architecture is a collection of small, independent services.

  • Monolithic architecture is tightly coupled and difficult to scale.

  • Microservices architecture is loosely coupled and can be scaled independently.

  • Monolithic architecture has a single point of failure while microservices architecture is resilient to failures.

  • Monolithic architecture is easier to develop while microservices architecture is more c...read more

Add your answer
right arrow

Q170. How many type of ges welding flame in used in welding?

Add your answer
right arrow

Q171. How to respond on any incident happened?

Ans.

The response to any incident should involve assessing the situation, notifying the appropriate authorities, documenting the incident, and providing any necessary assistance.

  • Assess the situation to determine the severity and nature of the incident

  • Notify the appropriate authorities, such as the police or emergency services

  • Document the incident by recording relevant details, including time, location, and any involved individuals

  • Provide any necessary assistance, such as guiding e...read more

View 1 answer
right arrow

Q172. A pseudo code or solution(if you can) for solving the rubik's cube

Ans.

A solution for solving the Rubik's cube

  • Use the layer-by-layer method

  • Solve the first layer cross

  • Solve the first layer corners

  • Solve the second layer

  • Solve the third layer cross

  • Solve the third layer corners

  • Orient the third layer corners

  • Permute the third layer corners

  • Permute the third layer edges

Add your answer
right arrow

Q173. Difference between an embedded system and an IOT device??

Ans.

Embedded systems are standalone devices with fixed functionality, while IoT devices are connected to the internet and can be remotely controlled.

  • Embedded systems are designed for specific tasks and have limited processing power and memory.

  • IoT devices are connected to the internet and can be controlled remotely through a network.

  • Embedded systems are often used in industrial and automotive applications, while IoT devices are used in smart homes, wearables, and other consumer ap...read more

Add your answer
right arrow

Q174. What are the latest Samsung products and their new features?

Ans.

The latest Samsung products include the Galaxy S21 series, Galaxy Buds Pro, and Galaxy Watch 3.

  • Galaxy S21 series: Features a powerful processor, improved camera system, and 5G connectivity.

  • Galaxy Buds Pro: Offers active noise cancellation, immersive sound quality, and touch controls.

  • Galaxy Watch 3: Provides advanced health monitoring, ECG tracking, and customizable watch faces.

Add your answer
right arrow

Q175. What is C++?

Ans.

C++ is a high-level programming language used for developing system software, application software, device drivers, and video games.

  • C++ was developed by Bjarne Stroustrup in 1983.

  • It is an extension of the C programming language.

  • C++ supports object-oriented programming, generic programming, and low-level memory manipulation.

  • It is widely used in industries such as finance, gaming, and operating systems development.

  • Examples of popular software written in C++ include Microsoft Wi...read more

Add your answer
right arrow

Q176. What is OOP?

Ans.

OOP stands for Object-Oriented Programming, a programming paradigm that focuses on objects and their interactions.

  • OOP is based on the concepts of encapsulation, inheritance, and polymorphism.

  • It allows for modular and reusable code.

  • Examples of OOP languages include Java, C++, and Python.

Add your answer
right arrow

Q177. What steps would you take to observe the field if you were to visit it?

Ans.

I would conduct thorough field observations by following a structured approach.

  • Create a checklist of key areas to observe such as customer interactions, employee performance, and store layout.

  • Interact with employees and customers to gather feedback and insights.

  • Review sales data and inventory levels to assess performance and identify areas for improvement.

  • Observe competitor activity and market trends to stay informed and competitive.

  • Document findings and create a report with ...read more

Add your answer
right arrow

Q178. Why is a Base Station Controller (BSC) unnecessary in a 4G network?

Ans.

A BSC is unnecessary in a 4G network because the functions of a BSC are integrated into the base station in 4G technology.

  • In 4G networks, the functions of a BSC are handled by the eNodeB (Evolved Node B), which combines the functionalities of both the BSC and the Node B in previous generations.

  • The eNodeB in a 4G network directly communicates with the core network, eliminating the need for a separate BSC.

  • This integration simplifies the network architecture, reduces latency, an...read more

Add your answer
right arrow

Q179. What are the uplink and downlink speeds in a 4G network?

Ans.

Uplink and downlink speeds in a 4G network typically range from 5-50 Mbps and 50-100 Mbps respectively.

  • Uplink speeds in a 4G network usually range from 5-50 Mbps

  • Downlink speeds in a 4G network typically range from 50-100 Mbps

  • Speeds can vary based on network congestion, location, and device capabilities

Add your answer
right arrow

Q180. Given two polynomials as linked lists, return a linked list which represents the product of two polynomials

Ans.

The function takes two polynomials represented as linked lists and returns a linked list representing their product.

  • Traverse both linked lists and multiply the corresponding coefficients of each term

  • Create a new linked list to store the product terms

  • Keep track of the current term in the product linked list and update it as you multiply

  • Handle cases where the product of coefficients is zero

Add your answer
right arrow

Q181. Write the functions to create a stack and to delete a node from the stack

Ans.

Functions to create and delete nodes in a stack

  • To create a stack, initialize a top pointer to null

  • To push a node, create a new node and set its next to the current top, then set top to the new node

  • To pop a node, set top to its next and return the popped node

  • To delete the stack, pop all nodes until top is null

Add your answer
right arrow
Q182. What is a process in an operating system?
Ans.

A process in an operating system is an instance of a program that is being executed.

  • A process is a unit of execution within an operating system.

  • Each process has its own memory space, resources, and state.

  • Processes can communicate with each other through inter-process communication.

  • Examples of processes include web browsers, word processors, and media players.

Add your answer
right arrow

Q183. Write a code for get alternate nodes from linked list

Add your answer
right arrow

Q184. What are the basic role of JAVA in the development of software?

Ans.

JAVA is a versatile programming language used for developing various software applications.

  • JAVA is platform-independent and can run on any operating system

  • It is object-oriented and supports multithreading

  • JAVA is widely used for developing web applications, mobile applications, and enterprise software

  • It provides a vast library of pre-built classes and APIs for developers to use

  • JAVA is also used for developing games, scientific applications, and financial applications

Add your answer
right arrow

Q185. How do you find the middle of the linked list?

Ans.

To find the middle of a linked list, use two pointers - one moving at twice the speed of the other.

  • Initialize two pointers - slow and fast

  • Move the slow pointer one step at a time and the fast pointer two steps at a time

  • When the fast pointer reaches the end of the list, the slow pointer will be at the middle

Add your answer
right arrow

Q186. Is sale down what should we do to increase the sale ?

Ans.

To increase sales, we need to analyze the market, identify customer needs, improve product quality, and implement effective marketing strategies.

  • Analyze the market to identify trends and competition

  • Identify customer needs and preferences

  • Improve product quality and features

  • Implement effective marketing strategies such as targeted advertising and promotions

  • Provide excellent customer service to retain existing customers and attract new ones

Add your answer
right arrow
Q187. How does C++ support polymorphism?
Ans.

C++ supports polymorphism through virtual functions and inheritance.

  • C++ supports polymorphism through virtual functions and inheritance

  • Virtual functions allow a function to be overridden in a derived class

  • Base class pointers can point to derived class objects, allowing for dynamic binding

  • Example: class Animal { virtual void speak() { cout << 'Animal speaks'; } }; class Dog : public Animal { void speak() { cout << 'Dog barks'; } };

  • Example: Animal* a = new Dog(); a->speak(); //...read more

Add your answer
right arrow

Q188. Time complexity of building a heap using linked list and arrays

Ans.

Time complexity of building a heap using linked list and arrays

  • Building a heap using linked list takes O(nlogn) time complexity

  • Building a heap using arrays takes O(n) time complexity

  • Linked list implementation is slower than array implementation

Add your answer
right arrow

Q189. Difference between DFS and BFS?When to use which one?

Ans.

DFS and BFS are graph traversal algorithms. DFS explores as far as possible before backtracking. BFS explores level by level.

  • DFS stands for Depth First Search, while BFS stands for Breadth First Search.

  • DFS explores as far as possible along each branch before backtracking, while BFS explores level by level.

  • DFS uses a stack data structure, while BFS uses a queue data structure.

  • DFS is often used for solving problems like finding connected components, topological sorting, and sol...read more

Add your answer
right arrow

Q190. What is deadlock? how to prevent deadlock?

Ans.

Deadlock is a situation where two or more processes are unable to proceed because they are waiting for each other to release resources.

  • Prevent deadlock by using a proper resource allocation strategy

  • Avoid holding onto resources for too long

  • Use timeouts to release resources if they are not being used

  • Implement a deadlock detection and recovery mechanism

  • Avoid circular wait by imposing a total ordering of all resource types

Add your answer
right arrow

Q191. Write a code &amp; explain public protected &amp; private variables

Add your answer
right arrow

Q192. Different properties of OOPs ,examples of each, with application of each?

Ans.

OOPs properties and examples with applications

  • Encapsulation: bundling of data and methods within a class. Example: Java class. Application: data hiding and security.

  • Inheritance: creating a new class from an existing class. Example: subclass. Application: code reusability and extensibility.

  • Polymorphism: ability of an object to take on many forms. Example: method overloading. Application: flexibility and modularity.

  • Abstraction: hiding implementation details and showing only nec...read more

Add your answer
right arrow

Q193. What is deffrent between suction and discharge line

Ans.

The suction line carries low-pressure refrigerant vapor from the evaporator to the compressor, while the discharge line carries high-pressure refrigerant vapor from the compressor to the condenser.

  • The suction line is larger in diameter compared to the discharge line.

  • The suction line carries refrigerant vapor at low pressure and low temperature.

  • The discharge line carries refrigerant vapor at high pressure and high temperature.

  • The suction line connects the evaporator outlet to ...read more

View 1 answer
right arrow

Q194. What is late binding

Ans.

Late binding is a programming concept where the method or function to be executed is determined at runtime.

  • Also known as dynamic binding or runtime binding

  • Allows for greater flexibility in code execution

  • Commonly used in object-oriented programming languages

  • Example: virtual functions in C++

Add your answer
right arrow

Q195. What type of OS is Windows?

Ans.

Windows is a proprietary operating system developed by Microsoft.

  • Windows is a graphical user interface (GUI) based operating system.

  • It is designed to run on personal computers, servers, and mobile devices.

  • Windows has different versions such as Windows 10, Windows 8, Windows 7, etc.

  • It supports a wide range of software applications and hardware devices.

  • Windows is known for its ease of use and user-friendly interface.

Add your answer
right arrow

Q196. Difference between an FIR and IIR filter??

Ans.

FIR filters have finite impulse response while IIR filters have infinite impulse response.

  • FIR filters have a linear phase response while IIR filters do not necessarily have a linear phase response.

  • FIR filters are always stable while IIR filters may not be stable depending on the coefficients used.

  • FIR filters have a fixed number of coefficients while IIR filters have a variable number of coefficients.

  • Examples of FIR filters include moving average filters and low-pass filters w...read more

Add your answer
right arrow

Q197. What is constant int pointer and pointer to constant integer.

Ans.

Constant int pointer points to a memory location whose value cannot be changed. Pointer to constant integer points to a memory location whose value cannot be changed through the pointer.

  • Constant int pointer: int *const ptr = #

  • Pointer to constant integer: const int *ptr = #

  • Constant int pointer can be initialized but cannot be reassigned.

  • Pointer to constant integer can be reassigned but cannot change the value of the integer.

Add your answer
right arrow

Q198. Tell about the spark architecture and data modelling

Ans.

Spark architecture is a distributed computing system that provides high-level APIs for big data processing.

  • Spark architecture consists of a cluster manager, a distributed storage system, and a computing engine.

  • Data in Spark is represented as Resilient Distributed Datasets (RDDs) or DataFrames.

  • Spark supports various data models, including batch processing, streaming, machine learning, and graph processing.

  • Spark's architecture allows for in-memory data processing, which improve...read more

Add your answer
right arrow
Q199. What are friend functions in C++?
Ans.

Friend functions in C++ are functions that are not members of a class but have access to its private and protected members.

  • Friend functions are declared inside a class with the keyword 'friend'.

  • They can access private and protected members of the class.

  • They are not member functions of the class, but have the same access rights as member functions.

  • Friend functions are useful for implementing operators that are not part of the class.

  • Example: friend int add(const MyClass& obj1, ...read more

Add your answer
right arrow
Q200. What is thrashing in operating systems?
Ans.

Thrashing in operating systems occurs when the system is spending more time swapping data between memory and disk than actually executing tasks.

  • Occurs when the system is constantly swapping data between memory and disk

  • Causes a decrease in system performance as it spends more time on swapping than executing tasks

  • Usually happens when the system does not have enough physical memory to handle the workload efficiently

Add your answer
right arrow
Previous
1
2
3
4
Next

More about working at Samsung

Back
Awards Leaf
AmbitionBox Logo
Top Rated Mega Company - 2024
Awards Leaf
Awards Leaf
AmbitionBox Logo
Top Rated Consumer Electronics Company - 2024
Awards Leaf
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos

Interview Process at Samsung

based on 398 interviews
Interview experience
4.2
Good
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

Reliance Retail Logo
3.9
 • 497 Interview Questions
Omega Healthcare Logo
3.7
 • 214 Interview Questions
Info Edge Logo
3.9
 • 198 Interview Questions
Myntra Logo
4.0
 • 158 Interview Questions
FactSet Logo
3.9
 • 157 Interview Questions
S&P Global Logo
4.1
 • 148 Interview Questions
View all
Recently Viewed
PHOTOS
Medanta the Medicity
4 office photos
LIST OF COMPANIES
Fosroc India
Overview
INTERVIEWS
Pfizer
No Interviews
REVIEWS
Sanofi
No Reviews
INTERVIEWS
Viatris
No Interviews
INTERVIEWS
Abbott
No Interviews
DESIGNATION
REVIEWS
Sanofi
No Reviews
INTERVIEWS
Vivo
No Interviews
LIST OF COMPANIES
Panasonic
Overview
Top Samsung Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter