Upload Button Icon Add office photos
Engaged Employer

i

This company page is being actively managed by Cognizant Team. If you also belong to the team, you can get access from here

Cognizant Verified Tick

Compare button icon Compare button icon Compare

Filter interviews by

Cognizant Programmer Analyst Trainee Interview Questions and Answers

Updated 26 Jul 2025

232 Interview questions

A Programmer Analyst Trainee was asked 3d ago
Q. What is the SQL query to create a table for employee details?
Ans. 

SQL query to create a table for storing employee details including ID, name, position, and salary.

  • Use CREATE TABLE statement to define a new table.

  • Specify the table name, e.g., 'Employees'.

  • Define columns with data types, e.g., 'EmployeeID INT PRIMARY KEY'.

  • Include other fields like 'Name VARCHAR(100)', 'Position VARCHAR(50)', and 'Salary DECIMAL(10, 2)'.

  • Example query: CREATE TABLE Employees (EmployeeID INT PRIMARY ...

A Programmer Analyst Trainee was asked 3d ago
Q. How can you find prime numbers using Python?
Ans. 

Use Python to check for prime numbers by testing divisibility from 2 to the square root of the number.

  • A prime number is greater than 1 and has no divisors other than 1 and itself.

  • Use a loop to check divisibility for numbers from 2 to the square root of the target number.

  • Example: To check if 7 is prime, test divisibility by 2, 3 (up to sqrt(7)).

  • Use a function to encapsulate the logic for reusability.

  • Example functio...

Programmer Analyst Trainee Interview Questions Asked at Other Companies

asked in Cognizant
Q1. Correct the syntax and logical errors in the given C code to achi ... read more
asked in Cognizant
Q2. If you promised a customer a product by a specific date, but your ... read more
asked in Cognizant
Q3. Alien Dictionary Problem Statement You are provided with a sorted ... read more
asked in Cognizant
Q4. What are OOP characteristics? Difference between abstraction and ... read more
asked in Cognizant
Q5. Why is Java platform independent?
A Programmer Analyst Trainee was asked 1mo ago
Q. Explain the OOPs concepts with examples.
Ans. 

OOPs concepts include encapsulation, inheritance, polymorphism, and abstraction, essential for modular programming.

  • Encapsulation: Bundling data and methods in a class. Example: A 'Car' class with properties like 'color' and methods like 'drive()'.

  • Inheritance: Deriving new classes from existing ones. Example: 'ElectricCar' inherits from 'Car', adding features like 'batteryCapacity'.

  • Polymorphism: Ability to use a si...

A Programmer Analyst Trainee was asked 1mo ago
Q. What is the process of web development?
Ans. 

Web development involves creating and maintaining websites through various stages, including planning, design, coding, and testing.

  • 1. Planning: Define the website's purpose and target audience. Example: A portfolio site for showcasing work.

  • 2. Design: Create wireframes and mockups to visualize layout. Example: Using tools like Figma or Adobe XD.

  • 3. Development: Write code using languages like HTML, CSS, and JavaScri...

What people are saying about Cognizant

View All
an azure cloud devops engineer
2w
Am I Offered Right Package? Cloud DevOps Engineer!
Hi there! I am a Cloud DevOps Engineer with 5.9 years of experience specialized in Azure. I am currently in a job switch, and I notice that companies are not able to match or provide more than a 25 LPA salary. Are others also facing similar issues? Or is it just me? I tried in mostly all IT MNCs and then rejected offers during offer letter discussions. For example, TCS, Infosys, Cognizant, Wipro, PWC, and Tech Mahindra. Most of them have budgets up to 22 LPA only. Thanks for your input.
Got a question about Cognizant?
Ask anonymously on communities.
A Programmer Analyst Trainee was asked 3mo ago
Q. Tell me about inheritance with an example.
Ans. 

Inheritance is a fundamental OOP concept allowing a class to inherit properties and methods from another class, promoting code reuse.

  • Base Class: The class from which properties and methods are inherited is called the base class (or parent class). For example, 'Animal' can be a base class.

  • Derived Class: The class that inherits from the base class is called the derived class (or child class). For instance, 'Dog' can...

A Programmer Analyst Trainee was asked 3mo ago
Q. Tell me about polymorphism with an example.
Ans. 

Polymorphism allows objects to be treated as instances of their parent class, enabling method overriding and dynamic method resolution.

  • Method Overriding: A subclass can provide a specific implementation of a method that is already defined in its superclass. Example: A class 'Animal' with a method 'sound()', and subclasses 'Dog' and 'Cat' overriding 'sound()' to bark and meow respectively.

  • Method Overloading: Multip...

Cognizant HR Interview Questions

684 questions and answers

Q. Are you willing to work flexible hours?
Q. Tell me about a time you faced a challenge at work and how you handled it.
Q. What are you looking for in a new position?
🔥 Asked by recruiter 2 times
A Programmer Analyst Trainee was asked 3mo ago
Q. Write a program to determine if a given year is a leap year.
Ans. 

A leap year occurs every four years, except for years divisible by 100 but not by 400, ensuring calendar accuracy.

  • Basic Rule: A year is a leap year if it is divisible by 4.

  • Century Exception: Years divisible by 100 are not leap years unless they are also divisible by 400.

  • Examples: 2020 is a leap year (divisible by 4), while 1900 is not (divisible by 100 but not by 400).

  • Correct Calculation: To check if 2000 is a lea...

Are these interview questions helpful?
A Programmer Analyst Trainee was asked 4mo ago
Q. What are the differences between public, private, and hybrid cloud computing?
Ans. 

Public, private, and hybrid clouds differ in ownership, accessibility, and deployment models, catering to various business needs.

  • Public Cloud: Services offered over the internet, accessible to anyone (e.g., AWS, Google Cloud).

  • Private Cloud: Exclusive cloud infrastructure for a single organization, enhancing security and control (e.g., VMware, OpenStack).

  • Hybrid Cloud: Combines public and private clouds, allowing da...

A Programmer Analyst Trainee was asked 4mo ago
Q. Why is Python your preferred programming language?
Ans. 

Python is my preferred language due to its simplicity, versatility, and strong community support, making it ideal for various projects.

  • Easy to learn and read: Python's syntax is clear and concise, making it accessible for beginners. For example, a simple 'print' statement is intuitive.

  • Versatile applications: Python is used in web development (Django, Flask), data analysis (Pandas, NumPy), and machine learning (Ten...

🔥 Asked by recruiter 3 times
A Programmer Analyst Trainee was asked 4mo ago
Q. What are data types?
Ans. 

Data types define the kind of data a variable can hold, influencing operations and memory usage.

  • Primitive data types include integers, floats, and characters. Example: int age = 25;

  • Composite data types include arrays and structures. Example: int numbers[] = {1, 2, 3};

  • Data types help in memory allocation and type checking during compilation.

  • Different programming languages have different data types. Example: Python ...

Cognizant Programmer Analyst Trainee Interview Experiences

407 interviews found

Interview experience
3
Average
Difficulty level
Easy
Process Duration
2-4 weeks
Result
Selected Selected

I appeared for an interview in Jan 2025, where I was asked the following questions.

  • Q1. How can you find prime numbers using Python?
  • Ans. 

    Use Python to check for prime numbers by testing divisibility from 2 to the square root of the number.

    • A prime number is greater than 1 and has no divisors other than 1 and itself.

    • Use a loop to check divisibility for numbers from 2 to the square root of the target number.

    • Example: To check if 7 is prime, test divisibility by 2, 3 (up to sqrt(7)).

    • Use a function to encapsulate the logic for reusability.

    • Example function: de...

  • Answered by AI
  • Q2. What is the SQL query to create a table for employee details?
  • Ans. 

    SQL query to create a table for storing employee details including ID, name, position, and salary.

    • Use CREATE TABLE statement to define a new table.

    • Specify the table name, e.g., 'Employees'.

    • Define columns with data types, e.g., 'EmployeeID INT PRIMARY KEY'.

    • Include other fields like 'Name VARCHAR(100)', 'Position VARCHAR(50)', and 'Salary DECIMAL(10, 2)'.

    • Example query: CREATE TABLE Employees (EmployeeID INT PRIMARY KEY, ...

  • Answered by AI
Interview experience
4
Good
Difficulty level
Moderate
Process Duration
2-4 weeks
Result
Selected Selected

I applied via Campus Placement and was interviewed in Nov 2024. There were 3 interview rounds.

Round 1 - Aptitude Test 

Easy-medium questions were asked in this

Round 2 - Coding Test 

The coding questions are mostly easy-moderate level difficulty and they ask questions based on specific clusters selected ( java, python, c# )

Round 3 - Technical 

(3 Questions)

  • Q1. Mostly he covered all the concepts of DBMS (along with syntaxes)
  • Q2. Asked to solve pseudo codes
  • Q3. Oops in real life with detail explanation along with implementation in java

Interview Preparation Tips

Topics to prepare for Cognizant Programmer Analyst Trainee interview:
  • DBMS
  • OOPS
  • Problem Solving
  • Operating Systems
  • Computer Networking
Interview preparation tips for other job seekers - basic aptitude, moderate problem solving skills, good communication skills are important along with knowledge in core subjects like CN,OS,OOPS and DBMS

Skills evaluated in this interview

Interview experience
5
Excellent
Difficulty level
Moderate
Process Duration
4-6 weeks
Result
Selected Selected

I applied via Campus Placement and was interviewed in Dec 2024. There were 3 interview rounds.

Round 1 - Aptitude Test 

The first round was the Aptitude Round, during which most candidates were eliminated.

Round 2 - Coding Test 

Three coding questions, one SQL task, and one development-related task.

Round 3 - Technical 

(2 Questions)

  • Q1. My Interview went for 40 min. in which 30 minutes he asked me Core Java Concepts and then AWS and then one simple code
  • Q2. Coding question - Write the code to print all the even number indexes from an array.

Interview Preparation Tips

Interview preparation tips for other job seekers - For more details read my article on medium
Link - -----/@KunjMaheshwari/my-cognizant-gen-c-interview-experience-a-journey-of-growth-and-achievement-f59b7abef35b
Interview experience
5
Excellent
Difficulty level
Moderate
Process Duration
2-4 weeks
Result
Selected Selected

I applied via Campus Placement

Round 1 - Aptitude Test 

It's Gec next Aptitude with English and reasoning

Round 2 - Technical 

(3 Questions)

  • Q1. Tell me about you self and some basic hr questions
  • Q2. 5 Aptitude and reasoning questions
  • Q3. 3 question of coding coding like swapping 2 number without using 3rd veriable reverse the string prime number odd number
Round 3 - HR 

(2 Questions)

  • Q1. Document verification and friendly discussion
  • Q2. Nothing much basic things

Interview Preparation Tips

Interview preparation tips for other job seekers - Go for lastest interview questions it will help
Interview experience
5
Excellent
Difficulty level
Easy
Process Duration
Less than 2 weeks
Result
Selected Selected

I appeared for an interview in Jul 2024.

Round 1 - Group Discussion 

GOT GENc offer of 4LPA
>>>Communication round was online it included multiple sections which needs skills of reading, listening, and speaking.(give this round and online coding round seriously as it will decide your interview package GENc,GENc pro,GENc Next).

Round 2 - Technical 

(3 Questions)

  • Q1. The first section was of sql . the first one was based on FROM and the second was based on JOINS.
  • Q2. The second section was based on DSA both question were DSA ARRAYS and STRING easy
  • Q3. The last section was devlopment section in which HTML ,CSS,JS code will be given and you have to correct it according to the required result given in the question
  • Ans. 

    Correct HTML, CSS, and JS code to meet specified requirements in a Programmer Analyst Trainee interview.

    • Check for missing or incorrect HTML tags, e.g., <div> instead of <div/>.

    • Ensure CSS styles are applied correctly, e.g., using class selectors.

    • Validate JavaScript functions for proper syntax and logic.

    • Use browser developer tools to debug and test changes.

    • Ensure responsive design with CSS media queries.

  • Answered by AI
Round 3 - One-on-one 

(3 Questions)

  • Q1. Tell me about your self ,it was the intro
  • Q2. After that i directed the interview towards dsa and oops (as far i heard from my friends they were asking DSA ,OOPS,DMBS,JAVA) basics only in DSA in the worst case LL basic (reverse LL ,Iteration ,loop d...
  • Q3. HR round question were asked in the technical round only ,no separate HR round. >>>are u willing to work from anywhere >>>are u ok in any tech stack >>>are u willing to in any shifts
Interview experience
5
Excellent
Difficulty level
Moderate
Process Duration
Less than 2 weeks
Result
No response

I applied via Campus Placement and was interviewed in Nov 2024. There were 3 interview rounds.

Round 1 - Aptitude Test 

Aptitude test include communication and aptitude test

Round 2 - Coding Test 

Coding test according to cluster

Round 3 - Technical 

(2 Questions)

  • Q1. What are oops pillars
  • Q2. Tell me about your project
Interview experience
4
Good
Difficulty level
Moderate
Process Duration
4-6 weeks
Result
No response

I applied via Campus Placement and was interviewed in Nov 2024. There was 1 interview round.

Round 1 - communication round 

(6 Questions)

  • Q1. Can you tell me about yourself?
  • Q2. What can you tell me about Cognizant?
  • Q3. What are the steps to create a table in SQL and display the output?
  • Q4. Write any basic python program and display the output
  • Ans. 

    A simple Python program that calculates the sum of two numbers and displays the result.

    • Define a function to add two numbers: `def add(a, b): return a + b`.

    • Get user input for the two numbers: `num1 = int(input('Enter first number: '))`.

    • Call the function and display the result: `print('Sum:', add(num1, num2))`.

  • Answered by AI
  • Q5. What are the different types of joins in SQL?
  • Q6. Basic HR qns and about relocation
Interview experience
5
Excellent
Difficulty level
Hard
Process Duration
2-4 weeks
Result
Selected Selected

I appeared for an interview in Feb 2025.

Round 1 - Aptitude Test 

Easy questions ,if you have good knowledge in +2 ,I think that will help you.

Round 2 - Technical 

(1 Question)

  • Q1. Introduce yourself Diffence between RAM and ROME Explain about your project Questions on IOT and ML
Interview experience
4
Good
Difficulty level
Moderate
Process Duration
2-4 weeks
Result
Selected Selected

I appeared for an interview in Aug 2024.

Round 1 - Aptitude Test 

Basic aptitude questions from Quant, maths and reasoning

Round 2 - Technical 

(2 Questions)

  • Q1. Basic coding questions on C
  • Q2. Basic Electrical questions ( as I was in Electrical engineering background)
Round 3 - HR 

(2 Questions)

  • Q1. Document Verification
  • Q2. Pan-Aadhar validation

Interview Preparation Tips

Interview preparation tips for other job seekers - On campus interview
Interview experience
4
Good
Difficulty level
Easy
Process Duration
Less than 2 weeks
Result
Selected Selected

I applied via Campus Placement and was interviewed in Aug 2024. There were 2 interview rounds.

Round 1 - Aptitude Test 

Math, reasoning, english

Round 2 - Technical 

(2 Questions)

  • Q1. Introduction, questions based on resume
  • Q2. Dbms, your chosen language related questions

Interview Preparation Tips

Interview preparation tips for other job seekers - Don't panic it's easy

Cognizant Interview FAQs

How many rounds are there in Cognizant Programmer Analyst Trainee interview?
Cognizant interview process usually has 2-3 rounds. The most common rounds in the Cognizant interview process are Aptitude Test, Technical and HR.
How to prepare for Cognizant Programmer Analyst Trainee interview?
Go through your CV in detail and study all the technologies mentioned in your CV. Prepare at least two technologies or languages in depth if you are appearing for a technical interview at Cognizant. The most common topics and skills that interviewers at Cognizant expect are JIRA, Requirement Analysis, Quality Center, Web Services and Web Technologies.
What are the top questions asked in Cognizant Programmer Analyst Trainee interview?

Some of the top questions asked at the Cognizant Programmer Analyst Trainee interview -

  1. if you promised a customer for the product on a specific day and your company w...read more
  2. What are OOP characteristics? Difference between abstraction and encapsulation?...read more
  3. Why is java platform independe...read more
What are the most common questions asked in Cognizant Programmer Analyst Trainee HR round?

The most common HR questions asked in Cognizant Programmer Analyst Trainee interview are -

  1. What are your salary expectatio...read more
  2. Where do you see yourself in 5 yea...read more
  3. What are your strengths and weakness...read more
How long is the Cognizant Programmer Analyst Trainee interview process?

The duration of Cognizant Programmer Analyst Trainee interview process can vary, but typically it takes about less than 2 weeks to complete.

Tell us how to improve this page.

Overall Interview Experience Rating

4.3/5

based on 245 interview experiences

Difficulty level

Easy 37%
Moderate 60%
Hard 2%

Duration

Less than 2 weeks 49%
2-4 weeks 31%
4-6 weeks 9%
6-8 weeks 4%
More than 8 weeks 7%
View more

Interview Questions from Similar Companies

TCS Interview Questions
3.6
 • 11.2k Interviews
Accenture Interview Questions
3.7
 • 8.7k Interviews
Infosys Interview Questions
3.6
 • 8k Interviews
Wipro Interview Questions
3.7
 • 6.1k Interviews
Capgemini Interview Questions
3.7
 • 5.1k Interviews
Tech Mahindra Interview Questions
3.5
 • 4.2k Interviews
HCLTech Interview Questions
3.5
 • 4.2k Interviews
Genpact Interview Questions
3.7
 • 3.5k Interviews
IBM Interview Questions
3.9
 • 2.5k Interviews
DXC Technology Interview Questions
3.6
 • 846 Interviews
View all
Cognizant Programmer Analyst Trainee Salary
based on 8.8k salaries
₹3.3 L/yr - ₹5 L/yr
At par with the average Programmer Analyst Trainee Salary in India
View more details

Cognizant Programmer Analyst Trainee Reviews and Ratings

based on 898 reviews

3.4/5

Rating in categories

3.4

Skill development

3.3

Work-life balance

3.1

Salary

3.2

Job security

3.3

Company culture

2.9

Promotions

3.0

Work satisfaction

Explore 898 Reviews and Ratings
Associate
71k salaries
unlock blur

₹5.3 L/yr - ₹12.5 L/yr

Programmer Analyst
56.1k salaries
unlock blur

₹3.5 L/yr - ₹7.3 L/yr

Senior Associate
55.4k salaries
unlock blur

₹9.9 L/yr - ₹23.5 L/yr

Senior Processing Executive
30k salaries
unlock blur

₹2.2 L/yr - ₹6.5 L/yr

Technical Lead
18.5k salaries
unlock blur

₹6 L/yr - ₹21.2 L/yr

Explore more salaries
Compare Cognizant with

TCS

3.6
Compare

Infosys

3.6
Compare

Wipro

3.7
Compare

Accenture

3.7
Compare
write
Share an Interview