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
Full Stack Software Developer
Experienced
Clear (1)

20+ Cognizant Full Stack Software Developer Interview Questions and Answers

Updated 5 Feb 2024

Q1. Briefly explain the method you will use to execute an array linked list?

Ans.

An array linked list can be executed using a loop to traverse through the array and access the linked nodes.

  • Create an array to store the linked nodes

  • Assign the first node to the first element of the array

  • Use a loop to traverse through the array and access the linked nodes

  • To access the next node, use the index of the current node as the index of the next node in the array

  • Stop the loop when the last node is reached

View 1 answer
right arrow

Q2. What is the difference between primary key, foreign key, candidate key & super key?

Ans.

Primary key uniquely identifies a record, foreign key links tables, candidate key can be primary key, super key is a set of attributes.

  • Primary key: Unique identifier for a record in a table

  • Foreign key: Links tables together by referencing the primary key of another table

  • Candidate key: A set of attributes that can be used as a primary key

  • Super key: A set of attributes that can uniquely identify a record

View 1 answer
right arrow

Q3. What are streams in C++? What are predefined streams in C++?

Ans.

Streams in C++ are used for input and output operations. Predefined streams in C++ include cin, cout, cerr, and clog.

  • Streams in C++ are objects that allow reading from or writing to external sources or destinations.

  • cin is the standard input stream used for reading input from the user.

  • cout is the standard output stream used for printing output to the console.

  • cerr is the standard error stream used for printing error messages to the console.

  • clog is an alternative to cerr for pri...read more

View 1 answer
right arrow

Q4. What are reference variables and how is it defined in C++?

Ans.

Reference variables in C++ are aliases for other variables, allowing direct access and manipulation of the original data.

  • Reference variables are declared using an ampersand (&) symbol.

  • They must be initialized when declared and cannot be reassigned to refer to a different variable.

  • Changes made to a reference variable affect the original variable it refers to.

  • They are commonly used to pass variables by reference to functions.

  • Reference variables can be used to create multiple na...read more

View 1 answer
right arrow
Discover Cognizant interview dos and don'ts from real experiences

Q5. Can you tell us something about scope rules in C++?

Ans.

Scope rules in C++ determine the visibility and accessibility of variables and functions within a program.

  • Variables declared within a block have local scope and are only accessible within that block.

  • Global variables have file scope and can be accessed from any function within the file.

  • Function parameters have function scope and are only accessible within that function.

  • Nested blocks can have their own scope, and variables declared within them are only accessible within that bl...read more

View 1 answer
right arrow

Q6. What is the difference between a "semaphore" and a "monitor"?

Ans.

Semaphore and monitor are synchronization tools used in concurrent programming.

  • Semaphore is a signaling mechanism that allows multiple threads to access a shared resource simultaneously.

  • Monitor is a synchronization construct that allows threads to have both mutual exclusion and the ability to wait (block) for a certain condition to become true.

  • Semaphore is a lower-level primitive, while monitor is a higher-level abstraction.

  • Semaphore can be used to implement a monitor.

  • Example...read more

View 1 answer
right arrow
Are these interview questions helpful?

Q7. Do you think BCNF is better than 2NF & 3NF? Why?

Ans.

BCNF is not necessarily better than 2NF & 3NF, it depends on the specific requirements of the database.

  • BCNF is the highest normal form and ensures that there are no non-trivial functional dependencies between any subset of candidate keys.

  • 2NF and 3NF are also important and should be used when appropriate.

  • For example, if a database has a composite primary key and non-key attributes that depend on only one part of the key, 2NF should be used.

  • If a database has transitive dependen...read more

View 1 answer
right arrow

Q8. What are the various forms of normalisation?

Ans.

Normalization is a process of organizing data in a database to eliminate redundancy and improve data integrity.

  • First Normal Form (1NF) - Eliminate duplicate data by separating them into multiple tables.

  • Second Normal Form (2NF) - Remove partial dependencies by creating separate tables for sets of attributes.

  • Third Normal Form (3NF) - Eliminate transitive dependencies by creating separate tables for related attributes.

  • Boyce-Codd Normal Form (BCNF) - Remove anomalies by ensuring ...read more

View 1 answer
right arrow
Share interview questions and help millions of jobseekers 🌟
man with laptop

Q9. What is difference between rand() and srand()?

Ans.

rand() generates a random number, srand() seeds the random number generator.

  • rand() generates a pseudo-random number between 0 and RAND_MAX

  • srand() sets the seed for the random number generator used by rand()

  • srand() should be called before rand() to ensure different sequences of random numbers

  • Example: srand(time(NULL)) sets the seed to the current time, ensuring a different sequence each time the program is run

View 1 answer
right arrow

Q10. What is the "top-n analysis" in DBMS?

Ans.

Top-n analysis is a technique used in DBMS to retrieve the top n records based on a specific criteria.

  • Used to retrieve top n records

  • Based on specific criteria

  • Commonly used in data analysis and reporting

View 1 answer
right arrow

Q11. What are character constants in C++?

Ans.

Character constants are fixed values represented by a single character in C++.

  • They are enclosed in single quotes (' ')

  • Examples include 'a', 'B', '5', '$'

  • They are also known as character literals

View 1 answer
right arrow

Q12. What do you mean by normalisation?

Ans.

Normalisation is the process of organizing data in a database to reduce redundancy and improve data integrity.

  • It involves breaking down a table into smaller tables and defining relationships between them.

  • Normalization helps to eliminate data inconsistencies and anomalies.

  • There are different levels of normalization, with each level having specific rules to follow.

  • Examples of normalization include converting repeating groups into separate tables and creating a junction table fo...read more

View 1 answer
right arrow

Q13. Where do we generally create INDEX?

Ans.

INDEX is generally created on columns that are frequently used in WHERE, JOIN, and ORDER BY clauses.

  • INDEX improves the performance of SELECT queries.

  • INDEX should be created on columns with high selectivity.

  • INDEX should not be created on columns with low selectivity.

  • Examples of columns to create INDEX on are primary keys, foreign keys, and columns used in search queries.

View 1 answer
right arrow

Q14. Differentiate exclusive lock and shared lock.

Ans.

Exclusive lock is used when a resource is being modified and prevents other processes from accessing it. Shared lock allows multiple processes to read a resource simultaneously.

  • Exclusive lock is used for write operations, while shared lock is used for read operations.

  • Exclusive lock blocks other processes from acquiring both exclusive and shared locks on the same resource.

  • Shared lock allows multiple processes to acquire shared locks on the same resource simultaneously.

  • Exclusiv...read more

View 1 answer
right arrow

Q15. Explain these terms - Linked List, Stack, Queue.

Ans.

Linked List is a linear data structure. Stack and Queue are abstract data types.

  • Linked List: A collection of nodes where each node points to the next node.

  • Stack: A data structure where elements are added and removed from the top only.

  • Queue: A data structure where elements are added at the rear and removed from the front only.

  • Example: Browser history can be implemented using a Linked List.

  • Example: Undo/Redo functionality can be implemented using a Stack.

  • Example: Print queue ca...read more

View 1 answer
right arrow

Q16. What is object oriented model?

Ans.

Object oriented model is a programming paradigm that uses objects to represent real-world entities.

  • Objects have properties and methods that define their behavior

  • Encapsulation, inheritance, and polymorphism are key concepts in OOP

  • Examples of OOP languages include Java, C++, and Python

View 1 answer
right arrow

Q17. Define the terms OSI, TCP & IP.

Ans.

OSI, TCP & IP are networking protocols used for communication between devices on a network.

  • OSI (Open Systems Interconnection) is a conceptual model that defines how data is transmitted over a network.

  • TCP (Transmission Control Protocol) is a protocol that ensures reliable transmission of data between devices.

  • IP (Internet Protocol) is a protocol that handles the addressing and routing of data packets between devices on a network.

  • TCP/IP is a suite of protocols that are commonly ...read more

View 1 answer
right arrow

Q18. What is Operating System?

Ans.

An operating system is a software that manages computer hardware and software resources.

  • It acts as an interface between the user and the computer hardware.

  • It provides services to applications and manages system resources.

  • Examples include Windows, macOS, Linux, Android, and iOS.

View 1 answer
right arrow

Q19. What is RDBMS KERNEL?

Ans.

RDBMS KERNEL is not a commonly used term in the industry.

  • There is no widely accepted definition of RDBMS KERNEL.

  • It may refer to the core components of a relational database management system.

  • It could also be a term used by a specific company or product.

  • Without more context, it is difficult to provide a specific answer.

View 1 answer
right arrow

Q20. Define triggers. Give its applications.

Ans.

Triggers are events that initiate an action or set of actions. They are commonly used in databases and automation systems.

  • Triggers are used in databases to automatically execute a set of actions when a certain event occurs, such as inserting or updating data.

  • They can also be used in automation systems to initiate a process or workflow when a specific event occurs, such as receiving an email or a file upload.

  • Triggers can be programmed to perform a variety of actions, such as s...read more

View 1 answer
right arrow

Q21. Why is DML provided?

Ans.

DML is provided to manipulate data in a database.

  • DML stands for Data Manipulation Language.

  • It is used to insert, update, delete, and retrieve data from a database.

  • DML commands include INSERT, UPDATE, DELETE, and SELECT.

  • DML is essential for managing and maintaining data in a database.

View 1 answer
right arrow

Q22. Diff. Between promise and observable

Ans.

Promise is a one-time event while Observable can emit multiple values over time.

  • Promise is used for asynchronous operations that will return a single value or an error.

  • Observable is used for asynchronous operations that can return multiple values over time.

  • Promise can be in one of three states: pending, fulfilled, or rejected.

  • Observable can emit values, errors, and completion events.

  • Promise can be converted to an Observable using the from() method in RxJS.

  • Observable can be co...read more

Add your answer
right arrow

Q23. Differentiate RDBMS and DBMS.

Ans.

RDBMS is a type of DBMS that stores data in a structured manner using tables with relationships.

  • RDBMS stands for Relational Database Management System

  • Data is stored in tables with predefined relationships

  • Data is accessed using SQL (Structured Query Language)

  • Examples include MySQL, Oracle, and SQL Server

  • DBMS is a broader term that includes all types of database management systems

  • Examples of DBMS include MongoDB, Cassandra, and Redis

View 1 answer
right arrow

Q24. Jwt security implementation in angular

Ans.

Jwt security implementation in Angular

  • Install angular-jwt package

  • Create an auth service to handle token storage and retrieval

  • Add an HttpInterceptor to attach the token to outgoing requests

  • Use guards to protect routes based on authentication status

Add your answer
right arrow

Q25. Discuss transparent DBMS.

Ans.

Transparent DBMS allows users to see and control the underlying database operations.

  • Transparent DBMS provides visibility into the database operations and allows users to monitor and control them.

  • It enables users to see how data is being stored, accessed, and manipulated in real-time.

  • Examples include Oracle Transparent Data Encryption and Microsoft SQL Server Transparent Data Encryption.

  • Transparent DBMS can improve security, performance, and compliance with regulations.

View 1 answer
right arrow

Q26. Define RDBMS.

Ans.

RDBMS stands for Relational Database Management System.

  • It is a type of database management system that stores data in tables with relationships between them.

  • It uses SQL (Structured Query Language) to manipulate and retrieve data.

  • Examples include MySQL, Oracle, and Microsoft SQL Server.

View 1 answer
right arrow

Q27. Define subquery.

Ans.

A subquery is a query within another query used to retrieve data that will be used in the main query.

  • Subqueries are enclosed in parentheses and placed within the WHERE clause of the main query.

  • They can be used to filter results based on a condition that involves data from another table.

  • Subqueries can also be used in the SELECT, FROM, and HAVING clauses.

  • Examples include finding the average salary of employees in a department or selecting the top 5 customers based on their tota...read more

View 1 answer
right arrow

Q28. Lifecycle hooks in angular

Ans.

Angular lifecycle hooks are methods that get called at specific stages of a component's lifecycle.

  • ngOnInit() - called after the component is initialized

  • ngOnChanges() - called when the component's input properties change

  • ngOnDestroy() - called just before the component is destroyed

  • ngAfterViewInit() - called after the component's view has been initialized

  • ngAfterContentInit() - called after the component's content has been initialized

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 Full Stack Software Developer

based on 1 interviews
Interview experience
5.0
Excellent
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
Recently Viewed
INTERVIEWS
Ahluwalia Contracts India
No Interviews
INTERVIEWS
Winjit Technologies
No Interviews
INTERVIEWS
Ahluwalia Contracts India
No Interviews
SALARIES
ANJ Turnkey Projects
INTERVIEWS
Rajhans (Desai-Jain) Group
No Interviews
LIST OF COMPANIES
Civil Power General Contracting L.L.C
Overview
SALARIES
Ivrcl Infrastructures & Projects
INTERVIEWS
Ahluwalia Contracts India
No Interviews
SALARIES
ANJ Turnkey Projects
INTERVIEWS
Ahluwalia Contracts India
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