Add office photos
Cognizant logo
Engaged Employer

Cognizant

Verified
3.7
based on 50.6k Reviews
Video summary
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by
GenC
Fresher
Skills
Clear (1)

100+ Cognizant GenC Interview Questions and Answers

Updated 10 Nov 2024

Q101. define array?

Ans.

An array is a collection of elements of the same data type, stored in contiguous memory locations.

  • Arrays can be of any data type, including integers, floats, and objects.

  • Arrays are accessed using an index, starting from 0.

  • Arrays can be initialized with a fixed size or dynamically resized.

  • Example: string[] names = {"John", "Jane", "Bob"};

  • Example: int[] numbers = new int[5];

  • Example: object[] objects = new object[3] {1, "hello", true};

Add your answer
right arrow

Q102. OOPs in java

Ans.

OOPs in Java is a programming paradigm that focuses on objects and their interactions.

  • Encapsulation, Inheritance, Polymorphism, and Abstraction are the four pillars of OOPs in Java.

  • Encapsulation is the process of hiding implementation details from the user.

  • Inheritance is the process of inheriting properties and methods from a parent class.

  • Polymorphism is the ability of an object to take on many forms.

  • Abstraction is the process of hiding implementation details while showing on...read more

Add your answer
right arrow
Cognizant GenC Interview Questions and Answers for Freshers
illustration image

Q103. oops in detail

Ans.

Object-oriented programming paradigm that focuses on data encapsulation, inheritance, and polymorphism.

  • Encapsulation: bundling of data and methods that manipulate the data within a single unit

  • Inheritance: ability of a class to inherit properties and methods from a parent class

  • Polymorphism: ability of objects to take on multiple forms or behaviors depending on the context

  • Examples: Java, C++, Python

Add your answer
right arrow

Q104. code for factorial

Ans.

Factorial code calculates the product of all positive integers up to a given number.

  • Use a loop to multiply all positive integers up to the given number

  • Handle edge cases like 0 and negative numbers

  • Example: Factorial of 5 is 5*4*3*2*1 = 120

Add your answer
right arrow
Discover Cognizant interview dos and don'ts from real experiences

Q105. Libraries in python

Ans.

Python has a rich set of libraries for various purposes.

  • Python standard library provides modules for file I/O, regular expressions, networking, and more.

  • Third-party libraries like NumPy, Pandas, Matplotlib, and Scikit-learn are widely used for data analysis and machine learning.

  • Python also has libraries for web development, game development, GUI programming, and more.

  • Libraries can be installed using pip, the package manager for Python.

  • Libraries can be imported using the impor...read more

Add your answer
right arrow
Previous
1
2

More about working at Cognizant

Back
Awards Leaf
AmbitionBox Logo
Top Rated Mega Company - 2024
Awards Leaf
Awards Leaf
AmbitionBox Logo
Top Rated IT/ITES Company - 2024
Awards Leaf
HQ - Teaneck. New Jersey., United States (USA)
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos

Interview Process at Cognizant GenC

based on 57 interviews
4 Interview rounds
Resume Shortlist Round
Aptitude Test Round
Technical Round - 1
Technical Round - 2
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
Recently Viewed
REVIEWS
IntouchCX
No Reviews
SALARIES
NXTDIGITAL
SALARIES
NXTDIGITAL
No Salaries
INTERVIEWS
IntouchCX
No Interviews
INTERVIEWS
CSIR URDIP
No Interviews
REVIEWS
NXTDIGITAL
No Reviews
COMPANY BENEFITS
HGS
No Benefits
INTERVIEWS
CSIR URDIP
No Interviews
JOBS
Magnify360 Hi-Tech Solutions
No Jobs
REVIEWS
HGS
No Reviews
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 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