Premium Employer

HCLTech

3.5
based on 35.9k Reviews
Filter interviews by

10+ Crescon Projects & Services Interview Questions and Answers

Updated 23 Jan 2025
Popular Designations

Q1. Singleton class creation (code) what is use of it ?

Ans.

Singleton class ensures only one instance of a class is created and provides a global point of access to it.

  • Ensures only one instance of a class is created

  • Provides a global point of access to the instance

  • Useful for managing global resources or settings

Add your answer

Q2. what's function pointer and what's it's signature

Ans.

A function pointer is a variable that stores the address of a function. Its signature includes the return type and parameter types of the function.

  • Function pointers allow for dynamic function calls based on the stored address

  • Syntax: return_type (*pointer_name)(parameter_types)

  • Example: void (*funcPtr)(int) = &someFunction;

Add your answer

Q3. Implementation of STL libraries any container class ex:- Vector

Ans.

STL libraries provide efficient and easy-to-use container classes like Vector for storing and manipulating data.

  • STL Vector is a dynamic array that can resize itself automatically.

  • It provides random access to elements, similar to arrays.

  • Vector supports various operations like push_back, pop_back, insert, erase, etc.

  • Example: std::vector<int> numbers = {1, 2, 3, 4, 5};

Add your answer

Q4. Copy one string to another without using any standard function

Ans.

Use a loop to copy characters from one string to another

  • Create two character arrays to store the strings

  • Use a loop to iterate through each character of the source string and copy it to the destination string

  • Add a null terminator at the end of the destination string to mark the end of the copied string

Add your answer
Discover Crescon Projects & Services interview dos and don'ts from real experiences

Q5. Write code to delete node from linked list

Ans.

To delete a node from a linked list, update the pointers of the previous node to skip the node to be deleted.

  • Traverse the linked list to find the node to be deleted

  • Update the pointers of the previous node to skip the node to be deleted

  • Free the memory allocated to the node to be deleted

Add your answer

Q6. Overload + operator to add two complex numbers

Ans.

Overload + operator to add two complex numbers in C++.

  • Define a class for complex numbers with real and imaginary parts.

  • Overload the + operator as a member function of the class.

  • Return a new complex number with the sum of real and imaginary parts.

Add your answer
Are these interview questions helpful?

Q7. What's compile time polymorphism

Ans.

Compile time polymorphism is achieved through function overloading and templates in C++.

  • Compile time polymorphism allows for different functions to be called based on the arguments provided at compile time.

  • Function overloading is a form of compile time polymorphism where multiple functions have the same name but different parameters.

  • Templates in C++ allow for generic programming and compile time polymorphism by creating functions or classes that can work with any data type.

  • Co...read more

Add your answer

Q8. What is the use of Mutex

Ans.

Mutex is used in multithreading to prevent multiple threads from accessing shared resources simultaneously.

  • Mutex stands for mutual exclusion and is used to synchronize access to shared resources in multithreaded programs.

  • It allows only one thread to access the shared resource at a time, preventing data corruption or race conditions.

  • Mutexes are typically used in critical sections of code where data integrity is important.

  • Example: Protecting a shared variable in a multithreaded...read more

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

Q9. Bit shift 1 by 4 position from LSB

Ans.

Bit shift 1 by 4 positions from LSB results in 16

  • Use the left shift operator (<<) to shift the bits by 4 positions

  • 1 << 4 = 16

Add your answer

Q10. Runtime polymorphism with example

Ans.

Runtime polymorphism allows objects of different classes to be treated as objects of a common superclass.

  • Use virtual functions in base class and override them in derived classes

  • Use pointers or references of base class to call derived class methods

  • Example: Animal class with virtual function 'makeSound', Dog and Cat classes overriding 'makeSound'

Add your answer

Q11. What's polymorphism

Ans.

Polymorphism is the ability of a function to behave differently based on the object it is called with.

  • Polymorphism allows objects of different classes to be treated as objects of a common superclass.

  • There are two types of polymorphism: compile-time (function overloading) and runtime (virtual functions).

  • Example: A base class Animal with a virtual function 'makeSound'. Subclasses Dog and Cat override 'makeSound' to bark and meow respectively.

Add your answer

Q12. Explain oops concepts

Ans.

OOP is a programming paradigm based on the concept of objects, which can contain data and code to manipulate that data.

  • OOP focuses on creating objects that interact with each other to solve complex problems.

  • Encapsulation: Objects encapsulate data and behavior within a single unit.

  • Inheritance: Objects can inherit attributes and methods from other objects.

  • Polymorphism: Objects can take on different forms or have multiple behaviors.

  • Example: A 'Car' object can have attributes lik...read more

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

Interview Process at Crescon Projects & Services

based on 2 interviews
Interview experience
4.0
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
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