Add office photos
Engaged Employer

Tech Q Ware Technologies

4.7
based on 29 Reviews
Filter interviews by

CN Solutions Interview Questions and Answers

Updated 28 Jan 2025

Q1. How to cut a cake in eight equal parts by using just three slices

Ans.

Cut the cake horizontally with the first two slices, then stack the pieces and cut vertically with the third slice.

  • Cut the cake horizontally with the first slice, creating two equal halves.

  • Stack the two halves on top of each other and cut horizontally again with the second slice, creating four equal quarters.

  • Finally, stack the four quarters and cut vertically with the third slice, creating eight equal parts.

Add your answer

Q2. How to define models and connect with specific database?

Ans.

Models are defined using classes or schemas in programming languages like Python or JavaScript, and connected to a specific database using ORM tools like SQLAlchemy or Mongoose.

  • Define models using classes or schemas that represent the structure of data in the database

  • Use ORM (Object-Relational Mapping) tools to connect models to the database

  • Specify the database connection details in the configuration file of the application

  • Use migrations to create or update database tables ba...read more

Add your answer

Q3. What is Oops and explain four pillars of Oops

Ans.

Oops stands for Object-Oriented Programming. The four pillars of Oops are Inheritance, Encapsulation, Abstraction, and Polymorphism.

  • Inheritance allows a class to inherit properties and behavior from another class. For example, a 'Car' class can inherit from a 'Vehicle' class.

  • Encapsulation refers to the bundling of data and methods that operate on the data into a single unit. For example, using private variables and public methods in a class.

  • Abstraction involves hiding the com...read more

Add your answer

Q4. What is json and how to access elements in json

Ans.

JSON is a lightweight data interchange format commonly used in web development to store and transmit data.

  • JSON stands for JavaScript Object Notation

  • It uses key-value pairs to store data

  • Access elements in JSON using dot notation or bracket notation

  • Example: accessing 'name' in JSON object - data.name

  • Example: accessing 'age' in JSON array - data[0].age

Add your answer
Discover CN Solutions interview dos and don'ts from real experiences

Q5. How to remove duplicates from an array

Ans.

Use a Set to remove duplicates from an array of strings.

  • Create a Set from the array to automatically remove duplicates

  • Convert the Set back to an array to get unique values

Add your answer

Q6. Major difference between list and tuple?

Ans.

List is mutable, tuple is immutable in Python.

  • List can be modified after creation, tuple cannot.

  • List uses square brackets [], tuple uses parentheses ().

  • List is slower than tuple due to mutability.

  • Example: list_example = [1, 2, 3], tuple_example = (1, 2, 3)

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

Interview Process at CN Solutions

based on 3 interviews
Interview experience
4.3
Good
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Interview Questions from Similar Companies

3.6
 • 122 Interview Questions
3.8
 • 76 Interview Questions
4.0
 • 49 Interview Questions
4.3
 • 36 Interview Questions
4.0
 • 27 Interview Questions
3.7
 • 17 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