Premium Employer

Netcracker Technology

3.0
based on 741 Reviews
Filter interviews by

Codelogicx Technologies Interview Questions and Answers

Updated 27 Jun 2024

Q1. check if thelinkedlist has a cycle exceptions threads arrays - reverse pattern matching

Ans.

To check if a linked list has a cycle, use Floyd's Tortoise and Hare algorithm.

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

  • If there is a cycle, the fast pointer will eventually meet the slow pointer.

  • Example: 1->2->3->4->2 (cycle exists between 4 and 2)

Add your answer

Q2. Difference between comprable and comparator in java

Ans.

Comparable is an interface used for natural ordering of objects, while Comparator is an interface used for custom ordering of objects.

  • Comparable interface is used to define the natural ordering of objects in a class by implementing the compareTo() method.

  • Comparator interface is used to define custom ordering of objects in a class by implementing the compare() method.

  • Example: Comparable interface is used in classes like String, Integer for default sorting. Comparator interface...read more

Add your answer

Q3. Given an array of integers, return thr largest subbaray sum

Ans.

Find the largest subarray sum in an array of integers

  • Use Kadane's algorithm to find the maximum subarray sum

  • Iterate through the array and keep track of the current sum and maximum sum

  • Reset the current sum to 0 if it becomes negative

Add your answer

Q4. V table and V pointer difference?

Ans.

V table is a table of function pointers used in object-oriented programming, while V pointer is a pointer to the V table.

  • V table is a table of function pointers used for dynamic dispatch in object-oriented programming.

  • V pointer is a pointer to the V table, allowing objects to call the correct functions at runtime.

  • Example: In C++ virtual functions are implemented using V tables and V pointers.

Add your answer
Discover Codelogicx Technologies interview dos and don'ts from real experiences

Q5. Explain friend function with syntax?

Ans.

Friend function is a function that is not a member of a class but has access to its private and protected members.

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

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

  • They are not member functions of the class.

  • Example: class MyClass { private: int x; friend void myFriendFunction(MyClass obj); };

Add your answer

Q6. A program to swap variables

Ans.

A program to swap variables

  • Declare two variables and assign values to them

  • Use a third variable to store the value of the first variable

  • Assign the value of the second variable to the first variable

  • Assign the value of the third variable to the second variable

Add your answer

Q7. Scope resolution with syntax ?

Ans.

Scope resolution refers to the process of specifying which scope a particular variable or function belongs to in a programming language.

  • Scope resolution is typically denoted by the double colon (::) operator in languages like C++ and PHP.

  • It is used to access static members, constants, and overridden methods in a class.

  • Example: ClassName::staticMember

  • Example: Namespace::functionName

Add your answer

Q8. Oops concepts in C Language?

Ans.

Oops concepts in C Language include encapsulation, inheritance, polymorphism, and abstraction.

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

  • Inheritance: Allowing a class to inherit properties and behavior from another class. Example: using struct to mimic inheritance.

  • Polymorphism: Ability to present the same interface for different data types. Example: function overloading in C.

  • Abstraction: Hiding the complex implem...read more

Add your answer

Q9. File handling classes?

Ans.

File handling classes are used in programming to read, write, and manipulate files.

  • File handling classes provide methods to open, read, write, and close files.

  • Examples include FileInputStream, FileOutputStream, FileReader, FileWriter in Java.

  • These classes help in managing file operations efficiently and securely.

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

Interview Process at Codelogicx Technologies

based on 9 interviews in the last 1 year
4 Interview rounds
Technical Round 1
Technical Round 2
HR Round 1
HR Round 2
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Engineer Interview Questions from Similar Companies

3.6
 • 164 Interview Questions
4.2
 • 48 Interview Questions
3.9
 • 44 Interview Questions
2.7
 • 40 Interview Questions
3.7
 • 20 Interview Questions
3.1
 • 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
Get AmbitionBox app

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