Open In App

Siemens Interview Questions and Answers for Technical Profiles

Last Updated : 07 Nov, 2023
Like Article

In this article we prepare for your Siemens technical interview with our comprehensive list of interview questions and expertly crafted answers.

Here in this article, we listed a few popular questions and answers that have been asked in the Siemens for Technical Profiles. Siemens concentrated on business, transportation, infrastructure, and healthcare.

To know more about Siemens Recruitment Process please go through this attachedlink


1. What’s the difference between a Web application and a Website?

Web Application Website
The web application is designed for interaction with end users. The website basically contains static content.
The user of the web application can read the content of the web application and also manipulate the data. The user of the website only can read the content of the website but not manipulate it.
The web application site should be pre-compiled before deployment. The website does not need to be pre-compiled.
The function of a web application is quite complex. The function of the website is simple.
A web application is interactive for users. A web site is not interactive for users.

2. What is a Pointer in C?
A pointer is defined as a derived data type that can store the address of other C variables or a memory location. We can access and manipulate the data stored in that memory location using pointers.

3. What is Software Development Life Cycle(SDLC)? What are it’s phases?
SDLC stands for software development life cycle. It is a process followed for software building within a software organization

4.What’s the difference between Stack and Queue ? 



A stack is a data structure that stores a collection of elements, with operations to push (add) and pop (remove) elements from the top of the stack. A queue is a data structure that stores a collection of elements, with operations to enqueue (add) elements at the back of the queue, and dequeue (remove) elements from the front of the queue.
Stacks are based on the LIFO principle, i.e., the element inserted at the last, is the first element to come out of the list. Queues are based on the FIFO principle, i.e., the element inserted at the first, is the first element to come out of the list.
Stacks are often used for tasks that require backtracking, such as parsing expressions or implementing undo functionality. Queues are often used for tasks that involve processing elements in a specific order, such as handling requests or scheduling tasks.
Insertion and deletion in stacks takes place only from one end of the list called the top. Insertion and deletion in queues takes place from the opposite ends of the list. The insertion takes place at the rear of the list and the deletion takes place from the front of the list.

5. What is a Kernel in Operating System and What are the types of Kernel ?
Kernel is central component of an operating system that manages operations of computer and hardware. It basically manages operations of memory and CPU time. It is core component of an operating system.

6. Explain Bug Life Cycle in Software Development ?
A defect is an error or bug in an application that is created during the building or designing of software and due to which software starts to show abnormal behaviors during its use.

7. What is linked list and What are the types of linked list?
A linked list is a linear data structure, in which the elements are not stored at contiguous memory locations. The elements in a linked list are linked using pointers.

Types Of Linked List:

  • Singly Linked List: It is the simplest type of linked list in which every node contains some data and a pointer to the next node of the same data type.
  • Doubly Linked List: A doubly linked list or a two-way linked list is a more complex type of linked list that contains a pointer to the next as well as the previous node in sequence.
  • Circular Linked List: A circular linked list is that in which the last node contains the pointer to the first node of the list.
  • Doubly Circular linked list: A Doubly Circular linked list or a circular two-way linked list is a more complex type of linked list that contains a pointer to the next as well as the previous node in the sequence.

8. What’s the difference between malloc() and calloc() ?



malloc() is a function that creates one block of memory of a fixed size. calloc() is a function that assigns a specified number of blocks of memory to a single variable.
malloc() only takes one argument calloc() takes two arguments.
malloc() is faster than calloc. calloc() is slower than malloc()
malloc() has high time efficiency calloc() has low time efficiency
malloc() is used to indicate memory allocation calloc() is used to indicate contiguous memory allocation

9. What are the various types of Trees in Data Structures ?
A Tree is a non-linear data structure and a hierarchy consisting of a collection of nodes such that each node of the tree stores a value and a list of references to other nodes (the “children”).

10. What is Polymorphism ?
The word polymorphism means having many forms. In simple words, we can define polymorphism as the ability of a message to be displayed in more than one form. 
Types of Polymorphism

  • Compile-time Polymorphism
  • Runtime Polymorphism

11. What do you mean by Virtual Memory ?
Virtual Memory is a storage allocation scheme in which secondary memory can be addressed as though it were part of the main memory. The addresses a program may use to reference memory are distinguished from the addresses the memory system uses to identify physical storage sites and program-generated addresses are translated automatically to the corresponding machine addresses. 

12. What is a parent/child selector?
It is a jQuery Selector used to select all elements that are the direct child of its parent element. 


("parent > child")

Parameter Values:

  • parent: Using this, the parent element will be selected.
  • child: Using this, the direct child element of the specified parent element will be selected.

13. What is the difference between an array and a hash table?
Arrays and Hash Tables are two of the most widely used data structures in computer science, both serving as efficient solutions for storing and accessing data in Java. They have different storage structures and time complexities, making them suitable for different use cases. In this article, we will explore the differences between arrays and hash tables in terms of storage structure and access time complexity in Java

Operations: Array Time Complexity Hash Table (HashMap) Time Complexity
Index Access 
O(1) (Constant) N/A
Key Access N/A O(1) Average, O(n) Worst Case
Lookup O(n) (Linear) O(1) Average, O(n) Worst Case
Search O(n) (Linear) O(n) Worst Case
Insertion O(n) (Linear) O(1) Average, O(n) Worst Case
Deletion O(n) (Linear) O(1) Average, O(n) Worst Case

14. What is a Linux Kernel ?
Linux operating System also consists of various components for example system libraries, user-space utilities, Linux kernel, and applications. The kernel is the core component of an operating system. This provides a platform for programs and various services to run on top of it. The Linux kernel is modifiable according to the user’s needs. Overall, the Linux Operating System and Linux kernel together provide a strong and user-friendly platform. 

15. What is OSI Model? What are the various layers of OSI model ?
The OSI model, created in 1984 by ISO, is a reference framework that explains the process of transmitting data between computers. It is divided into seven layers that work together to carry out specialised network functions, allowing for a more systematic approach to networking.

16. How will you delete a node in a doubly-linked list ?

  • Let the node to be deleted be del.
  • If node to be deleted is head node, then change the head pointer to next current head.
if headnode == del then
headnode = del.nextNode
  • Set prev of next to del, if next to del exists.
if del.nextNode != none 
del.nextNode.previousNode = del.previousNode
  • Set next of previous to del, if previous to del exists.
if del.previousNode != none 
del.previousNode.nextNode =

17. What is Encapsulation ?
 Encapsulation is a fundamental concept in object-oriented programming (OOP) that refers to the bundling of data and methods that operate on that data within a single unit, which is called a class in Java.

18. What do you mean by System Calls ?
In computing, a system call is a programmatic way in which a computer program requests a service from the kernel of the operating system it is executed on. A system call is a way for programs to interact with the operating system.

19. Difference Between Call by Value and Call by Reference

Call By Value

Call By Reference

While calling a function, we pass the values of variables to it. Such functions are known as “Call By Values”. While calling a function, instead of passing the values of variables, we pass the address of variables(location of variables) to the function known as “Call By References.
In this method, the value of each variable in the calling function is copied into corresponding dummy variables of the called function. In this method, the address of actual variables in the calling function is copied into the dummy variables of the called function.
With this method, the changes made to the dummy variables in the called function have no effect on the values of actual variables in the calling function. With this method, using addresses we would have access to the actual variables and hence we would be able to manipulate them.
In call-by-values, we cannot alter the values of actual variables through function calls. In call by reference, we can alter the values of variables through function calls.

20. What are the various Types of Network Protocols ?
A network protocol is an accepted set of rules that govern data communication between different devices in the network. It determines what is being communicated, how it is being communicated, and when it is being communicated.

Types of Network Protocols

In most cases, communication across a network like the Internet uses the OSI model. The OSI model has a total of seven layers. Secured connections, network management, and network communication are the three main tasks that the network protocol performs.

The protocols can be broadly classified into three major categories:

  1. Network Communication
  2. Network Management
  3. Network Security

21. What is a Constructors in C++ ?
Constructor in C++ is a special method that is invoked automatically at the time of object creation. It is used to initialize the data members of new objects generally. The constructor in C++ has the same name as the class or structure. It constructs the values i.e. provides data for the object which is why it is known as constructor.

  • Constructor is a member function of a class, whose name is same as the class name.
  • Constructor do not return value, hence they do not have a return type. 

22. What’s the difference between SDLC and STLC ? 

SDLC is mainly related to software development. STLC is mainly related to software testing.
Besides development other phases like testing is also included. It focuses only on testing the software.
SDLC involves total six phases or steps. STLC involves only five phases or steps.
In SDLC, more number of members (developers) are required for the whole process. In STLC, less number of members (testers) are needed.

23. What is an Inheritance ?
Inheritance is a feature or a process in which, new classes are created from the existing classes. The new class created is called “derived class” or “child class” and the existing class is known as the “base class” or “parent class”. The derived class now is said to be inherited from the base class.

24. What is a Deque ?
Deque, which stands for Double Ended Queue, is a special type of queue that allows adding and removing elements from both front and rear ends.

Applications of Deque:

  • Browser History: A deque can be used to store the history of recently visited web pages.
  • Text Editor: A deque can be used to undo and redo operations in a text editor.
  • Disk Scheduling: A deque can be used to schedule disk requests to improve disk performance.

25. What are the various type of Tree Traversal ?

Inorder Traversal

Algorithm Inorder(tree)

  1. Traverse the left subtree, i.e., call Inorder(left->subtree)
  2. Visit the root.
  3. Traverse the right subtree, i.e., call Inorder(right->subtree)

Preorder Traversal 

Algorithm Preorder(tree)

  1. Visit the root.
  2. Traverse the left subtree, i.e., call Preorder(left->subtree)
  3. Traverse the right subtree, i.e., call Preorder(right->subtree) 

Postorder Traversal

Algorithm Postorder(tree)

  1. Traverse the left subtree, i.e., call Postorder(left->subtree)
  2. Traverse the right subtree, i.e., call Postorder(right->subtree)
  3. Visit the root

26. Print K largest(or smallest) elements in an array ? 

The idea is to find the Kth largest element of the array and then print all the elements which are greater than or equal to Kth largest Element. The Kth largest element can be found using binary search by defining a search range based on the minimum and maximum values in the input array. In each iteration of binary search, count the larger than the midpoint and update the search range accordingly. This process continues until the range collapses to a single element, which is the kth largest element.

27. Check mirror in n-ary tree ?
(Using LinkedList):
The main approach is to use one list of stack and one list of queue to store to value of nodes given in the form of two arrays.

  1. Initialize both the lists with empty stack and empty queues respectively.
  2. Now, iterate over the lists 
    Push all connected nodes of each node of first tree in list of stack and second tree list of queue.
  3. Now iterate over the array and pop item from both stack and queue and check if they are same, if not same then return 0.

28. What’s the Difference Between Method Overloading and Method Overriding ?

Method Overloading

Method Overriding

Method overloading is a compile-time polymorphism. Method overriding is a run-time polymorphism.
Method overloading helps to increase the readability of the program. Method overriding is used to grant the specific implementation of the method which is already provided by its parent class or superclass.
It occurs within the class. It is performed in two classes with inheritance relationships.
Method overloading may or may not require inheritance. Method overriding always needs inheritance.

29. What’s the Difference between dispatcher and schedule ?

Definition Dispatcher is a module that gives control of CPU to the process selected by short term scheduler Scheduler is something which selects a process among various processes
Types There are no different types in dispatcher.It is just a code segment. There are 3 types of scheduler i.e. Long-term, Short-term, Medium-term
Dependency Working of dispatcher is dependent on scheduler.Means dispatcher have to wait until scheduler selects a process. Scheduler works independently. It works immediately when needed
Algorithm Dispatcher has no specific algorithm for its implementation Scheduler works on various algorithm such as FCFS, SJF, RR etc

30. What’s the difference between Heap and Stack ?



It is a linear data structure, which implies that elements are kept in a linear order, one after the other. Because it is a hierarchical data structure, the components are stored in the form of a tree.
Stack data structure works on LIFO (Last in First Out) property. Heap data structure follows min-heap or max-heap property.
The access time in stack is faster The access time in heap is slower
Stacks may be implemented in two ways: array, linked list. The implementation of heap can be done using arrays or trees

31. Find length of the longest valid substring ?
A Simple Approach is to find all the substrings of given string. For every string, check if it is a valid string or not. If valid and length is more than maximum length so far, then update maximum length. We can check whether a substring is valid or not in linear time using a stack (See this for details). 

Time complexity of this solution is O(n3).
Space Complexity: O(1)

32. Write an algorithm to count the number of leaf nodes in a Binary Tree.

The given problem can be solved by using the Level Order Traversal( Follow the steps below to solve the problem:

1) Create a queue(q) and initialize count variable with 0, and store the nodes in q along wise level order and iterate for next level.
2) Perform level order traversal and check if current node is a leaf node(don’t have right and left child) then increment the count variable.
3) After completing the above steps, return count variable.

33. Sort an array of 0s, 1s and 2s

The problem is similar to “Segregate 0s and 1s in an array”.

  • The problem was posed with three colors, here `0′, `1′ and `2′. The array is divided into four sections: 
    • arr[1] to arr[low – 1]
    • arr[low] to arr[mid – 1]
    • arr[mid] to arr[high – 1]
    • arr[high] to arr[n]
  • If the ith element is 0 then swap the element to the low range.
  • Similarly, if the element is 1 then keep it as it is.
  • If the element is 2 then swap it with an element in high range.

34. What is IP Spoofing?
IP Spoofing is essentially a technique used by hackers to gain unauthorized access to Computers. Concepts of IP Spoofing were initially discussed in academic circles as early as 1980. 

35. Remove last node of the linked list
Approach: To delete the last node of a linked list, find the second last node and make the next pointer of that node null. 


  1. If the first node is null or there is only one node, then they return null. 
    • if headNode == null then return null
    • if headNode.nextNode == null then free 
    • head and return null
  2. Create an extra space secondLast, and traverse the linked list till the second last node. 
    • while secondLast.nextNode.nextNode != null 
            secondLast = secondLast.nextNode 
  3. delete the last node, i.e. the next node of the second last node delete(secondLast.nextNode), and set the value of the next second-last node to null.

To check the Siemens Experiences and other asked question go through the attached link

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads