Add office photos
Employer?
Claim Account for FREE

Automotive Robotics (India)

3.6
based on 251 Reviews
Filter interviews by

T.khan Logistic Interview Questions and Answers

Updated 14 Dec 2024

Q1. What is the concept of virtual inheritance in relation to vtables and vptrs in object-oriented programming?

Ans.

Virtual inheritance allows a derived class to inherit from a base class without creating duplicate base class subobjects.

  • Virtual inheritance is used to resolve the Diamond Problem in C++ where a class inherits from two classes that have a common base class.

  • It ensures that only one copy of the base class is inherited by the derived class.

  • Virtual inheritance introduces a virtual base class subobject to the derived class, which is shared among all the classes that inherit from i...read more

Add your answer

Q2. What is the implementation of a class for string operations?

Ans.

A class for string operations can include methods for concatenation, substring extraction, length calculation, etc.

  • Create a class with methods like concatenateStrings, extractSubstring, calculateLength, etc.

  • Use string manipulation functions like substring, concat, length, etc. within the class methods.

  • Ensure error handling for edge cases like empty strings or out-of-bounds indices.

  • Example: class StringOperations { concatenateStrings(str1, str2) { return str1.concat(str2); } }

Add your answer

Q3. Difference between copy constructor and assignment operator

Ans.

Copy constructor is used to create a new object as a copy of an existing object, while assignment operator is used to assign values from one object to another.

  • Copy constructor is called when a new object is created from an existing object, while assignment operator is called when an existing object is assigned values from another object.

  • Copy constructor creates a new object with its own memory space, while assignment operator assigns values to an existing object's memory spac...read more

Add your answer

Q4. What is single ton design pattern

Ans.

Singleton design pattern ensures a class has only one instance and provides a global point of access to it.

  • Ensures a class has only one instance

  • Provides a global point of access to that instance

  • Commonly used in scenarios where only one instance of a class is needed, such as database connections or logging

Add your answer
Discover T.khan Logistic interview dos and don'ts from real experiences

Q5. What is copy constructor?

Ans.

Copy constructor is a special type of constructor which creates a new object as a copy of an existing object.

  • Copy constructor is used to initialize a new object as a copy of an existing object.

  • It takes an object of the same class as a parameter.

  • It is called automatically when a new object is created from an existing object.

  • Example: class MyClass { public: MyClass(const MyClass& obj) { // copy constructor logic } };

Add your answer

Q6. What is static function

Ans.

A static function is a function that is associated with a class rather than an instance of the class.

  • Static functions can be called without creating an instance of the class.

  • Static functions are commonly used for utility functions that do not require access to instance-specific data.

  • Static functions are declared using the 'static' keyword in many programming languages.

  • Example: 'Math.max()' in JavaScript is a static function.

Add your answer

Q7. Write Fibonacci series

Ans.

Fibonacci series is a sequence of numbers where each number is the sum of the two preceding ones.

  • Start with 0 and 1 as the first two numbers in the series

  • Add the previous two numbers to get the next number in the series

  • Repeat this process to generate the Fibonacci series

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at T.khan Logistic

based on 2 interviews
1 Interview rounds
Technical Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Interview Questions from Similar Companies

4.1
 • 321 Interview Questions
3.3
 • 36 Interview Questions
3.4
 • 24 Interview Questions
3.7
 • 22 Interview Questions
3.5
 • 13 Interview Questions
3.6
 • 10 Interview Questions
View all
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