Add office photos
Cognizant logo
Engaged Employer

Cognizant

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

10+ Cognizant Trainee Interview Questions and Answers

Updated 15 Jan 2025

Q1. Swapping number logic, what are C compilation stages, what is linker

Ans.

Answering questions on C compilation stages, linker, and swapping number logic.

  • Swapping number logic involves interchanging the values of two variables without using a third variable.

  • C compilation stages include preprocessing, compilation, assembly, and linking.

  • The linker is a program that combines object files generated by the compiler into a single executable file.

  • Example of swapping number logic: int a=5, b=10; a=a+b; b=a-b; a=a-b; //a=10, b=5

Add your answer
right arrow

Q2. Tell us about data base management system

Ans.

A database management system (DBMS) is a software that manages data stored in a database.

  • DBMS allows users to create, read, update, and delete data in a database.

  • It provides security and access control to prevent unauthorized access to data.

  • Examples of DBMS include MySQL, Oracle, Microsoft SQL Server, and MongoDB.

Add your answer
right arrow

Q3. 1.what is array? 2.find the index number of 3 from a list=[1,2,3,4] 3.what is list?

Ans.

An array is a data structure that stores a collection of elements, each identified by at least one array index or key.

  • An array can store elements of the same data type or different data types.

  • Arrays are commonly used in programming to store and manipulate data efficiently.

  • Example: ['apple', 'banana', 'orange'] is an array of strings.

Add your answer
right arrow

Q4. Write a programme for prime number in java

Ans.

Program to find prime numbers in Java

  • Take input from user

  • Loop through numbers from 2 to input-1

  • Check if input is divisible by any number in the loop

  • If not, it is a prime number

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

Q5. what is an pointer in c

Ans.

A pointer in C is a variable that stores the memory address of another variable.

  • Pointers are used to manipulate data directly in memory.

  • They can be used to pass values by reference to functions.

  • Example: int *ptr; ptr = # *ptr = 10; //num now has a value of 10

  • Null pointers are used to indicate that a pointer does not point to a valid memory address.

Add your answer
right arrow

Q6. Tell us about some SQL queries

Ans.

SQL queries are used to retrieve, manipulate and manage data stored in relational databases.

  • SELECT statement is used to retrieve data from a table

  • UPDATE statement is used to modify data in a table

  • DELETE statement is used to delete data from a table

  • JOIN statement is used to combine data from multiple tables

  • GROUP BY statement is used to group data based on a specific column

  • ORDER BY statement is used to sort data based on a specific column

Add your answer
right arrow
Are these interview questions helpful?

Q7. What is oops explain briefly?

Ans.

OOPs stands for Object-Oriented Programming. It is a programming paradigm that uses objects to design applications.

  • OOPs focuses on creating reusable code and organizing it into objects.

  • It uses concepts like inheritance, encapsulation, and polymorphism to achieve this.

  • Inheritance allows objects to inherit properties and methods from other objects.

  • Encapsulation hides the implementation details of an object from the outside world.

  • Polymorphism allows objects to take on multiple f...read more

Add your answer
right arrow

Q8. Write a column name in database?

Ans.

A column name in a database is a label given to a specific field of data within a table.

  • Column names should be descriptive and concise

  • Avoid using spaces or special characters in column names

  • Use camelCase or snake_case for multi-word column names

  • Examples: firstName, dateOfBirth, order_total

Add your answer
right arrow
Share interview questions and help millions of jobseekers 🌟
man with laptop

Q9. Tell me about pharmacovigilance

Ans.

Pharmacovigilance is the science and activities related to the detection, assessment, understanding, and prevention of adverse effects or any other drug-related problems.

  • Pharmacovigilance is the process of monitoring and evaluating the safety and efficacy of drugs.

  • It involves collecting and analyzing data on adverse drug reactions and other drug-related problems.

  • Pharmacovigilance is important for ensuring the safety of patients and improving the quality of healthcare.

  • Examples...read more

Add your answer
right arrow

Q10. What is list?

Ans.

A list is a collection of items that are ordered and can be accessed by their index.

  • Lists are mutable, meaning their contents can be changed.

  • Lists can contain elements of different data types.

  • Lists are created using square brackets [] and elements are separated by commas.

  • Example: my_list = [1, 'apple', True, 3.14]

Add your answer
right arrow

Q11. reverse a string using java

Ans.

Reverse a string using Java

  • Convert the string to a character array

  • Use two pointers, one at the start and one at the end of the array

  • Swap the characters at the two pointers and move them towards the center until they meet

  • Convert the character array back to a string

Add your answer
right arrow

Q12. What is AWS Lambda?

Ans.

AWS Lambda is a serverless computing service provided by Amazon Web Services.

  • Allows you to run code without provisioning or managing servers

  • Scales automatically based on the incoming traffic

  • Supports multiple programming languages like Node.js, Python, Java, etc.

  • Charged based on the number of requests and the compute time

  • Commonly used for event-driven applications, data processing, and automation tasks

Add your answer
right arrow

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 Trainee

based on 13 interviews
4 Interview rounds
Aptitude Test Round - 1
Aptitude Test Round - 2
HR Round
Personal Interview1 Round
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Trainee Interview Questions from Similar Companies

Wipro Logo
3.7
 • 21 Interview Questions
TCS Logo
3.7
 • 19 Interview Questions
Tata Motors Logo
4.2
 • 10 Interview Questions
Episource Logo
3.9
 • 10 Interview Questions
View all
Recently Viewed
INTERVIEWS
Wipro
No Interviews
INTERVIEWS
Dinex Emission Solutions India
No Interviews
SALARIES
Vectra Automation Software
No Salaries
SALARIES
Adiverse Technologies
INTERVIEWS
Flipkart
No Interviews
INTERVIEWS
AVON TUBETECH
No Interviews
SALARIES
Vectra Automation Software
SALARIES
Vectra Automation Software
REVIEWS
Vectra Automation Software
No Reviews
INTERVIEWS
Cummins
No Interviews
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