Add office photos
Engaged Employer

Hughes Systique Corporation

3.9
based on 239 Reviews
Filter interviews by

10+ KHY ELECTRONIC Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. Given 9 ball all of which weigh the same except for one, what is the minimum of weighings necessary to find the ball weighs more (or less)?

Ans.

The minimum number of weighings necessary is 2.

  • Divide the 9 balls into 3 groups of 3.

  • Weigh any two groups against each other.

  • If the two groups weigh the same, the heavier ball is in the third group.

  • If one group is heavier, the heavier ball is in that group.

  • Take the heavier group and weigh any two balls against each other.

  • If they weigh the same, the heavier ball is the remaining one.

  • If one ball is heavier, it is the heavier ball.

View 1 answer

Q2. If a rival company tries to use your code against us what will you do?

Ans.

I will ensure that our code is properly protected by implementing security measures and legal actions if necessary.

  • Implement security measures such as encryption and access control to prevent unauthorized access to our code.

  • Monitor for any suspicious activity and take immediate action if any unauthorized access is detected.

  • If necessary, take legal action against the rival company for intellectual property theft.

  • Collaborate with legal and management teams to ensure that our co...read more

Add your answer

Q3. 2. Difference between Linked List and Tree (where what should be used).

Ans.

Linked list is a linear data structure while tree is a hierarchical data structure.

  • Linked list is used when we need to maintain a sequence of elements and perform operations like insertion and deletion at any position.

  • Tree is used when we need to represent a hierarchical structure and perform operations like searching, insertion, and deletion efficiently.

  • Linked list has a single pointer to the next node while tree has multiple pointers to its child nodes.

  • Linked list has a lin...read more

Add your answer

Q4. 4. An array and 2 variables x and y are given, print y sub arrays with x elements.

Ans.

Print y sub arrays with x elements from given array and variables.

  • Use a loop to iterate through the array and create subarrays of x elements.

  • Use another loop to print y number of subarrays.

  • Handle edge cases where x or y is greater than the length of the array.

Add your answer
Discover KHY ELECTRONIC interview dos and don'ts from real experiences

Q5. 2. Find the first non repeating character in a string

Ans.

Find the first non-repeating character in a string.

  • Create a hash table to store the frequency of each character in the string.

  • Iterate through the string and check the frequency of each character.

  • Return the first character with a frequency of 1.

Add your answer

Q6. 1. Explain Trees and Binary Search Trees.

Ans.

Trees are data structures that store hierarchical data. Binary Search Trees are a type of tree that maintains sorted order.

  • Trees are composed of nodes that have a parent-child relationship.

  • Binary Search Trees have at most two children per node and the left child is always smaller than the parent while the right child is always larger.

  • Binary Search Trees allow for efficient searching, insertion, and deletion operations.

  • Examples of Binary Search Trees include AVL Trees and Red-...read more

Add your answer
Are these interview questions helpful?

Q7. 3. Remove duplicates from an array

Ans.

Remove duplicates from an array of strings

  • Create a new empty array

  • Loop through the original array and check if the element already exists in the new array

  • If not, add it to the new array

  • Return the new array

Add your answer

Q8. 3. A real-life example of Tree.

Ans.

A family tree is a real-life example of a tree data structure.

  • A family tree has a root node (the oldest ancestor) and branches out to children, grandchildren, etc.

  • Each node can have multiple child nodes but only one parent node.

  • The tree structure allows for easy visualization of relationships and ancestry.

  • Other examples include file systems, organization charts, and decision trees.

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. 9. What are Abstract classes

Ans.

Abstract classes are classes that cannot be instantiated and are meant to be extended by other classes.

  • Abstract classes are declared using the 'abstract' keyword.

  • They can have abstract and non-abstract methods.

  • Abstract methods are declared without a body and must be implemented by the subclass.

  • Abstract classes can have constructors and instance variables.

  • They are useful for creating a common interface for a group of related classes.

Add your answer

Q10. 5. Explain the function pointer.

Ans.

A function pointer is a variable that stores the memory address of a function.

  • Function pointers allow passing functions as arguments to other functions.

  • They can be used to implement callbacks and event handlers.

  • Function pointers can be used to implement polymorphism in C.

  • Example: int (*funcPtr)(int, int) = &add; where add is a function that takes two integers and returns their sum.

  • Function pointers can also be used to create function tables and switch statements.

Add your answer

Q11. 8. Characteristics of static function

Ans.

Static functions belong to the class and not to the instance of the class.

  • Can be called without creating an instance of the class

  • Cannot access non-static members of the class

  • Can access other static members of the class

  • Used for utility functions or helper functions

Add your answer

Q12. 6. Explain copy constructor

Ans.

Copy constructor creates a new object by copying an existing object.

  • Used to initialize an object with another object of the same class

  • Takes a reference to an object of the same class as a parameter

  • Creates a new object with the same values as the parameter object

  • Deep copy and shallow copy are two types of copy constructors

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 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