Softlogic Systems - Placement and Training Institute in Chennai

Easy way to IT Job

Cognizant Interview Questions and Answers
Share on your Social Media

Cognizant Interview Questions and Answers

Published On: July 22, 2024

Cognizant Interview Questions and Answers

Cognizant helps companies stay ahead in a constantly changing world by helping them modernize their technology, rethink their workflows, and improve customer experiences. Of all the MNCs providing fresher jobs in India, Cognizant provides an excellent platform for learning and building a career path for ambitious software engineers.

Eligibility Criteria to Enter Cognizant Jobs

The three segments of Cognizant’s business are digital systems and technology, digital business, and digital operations.

  • A candidate must have earned a diploma or more than 60% on their 10th and 12th grade exams.
  • An applicant’s graduation grade point average must be at least 60%.
  • A maximum of one year can pass between semesters of graduation or after HSC (12th), but not after SSC (10th).
  • Post-graduation programs in BE, B Tech, ME, M Tech, and MCA
  • There shouldn’t be any outstanding backlogs for a candidate during the Cognizant selection process.

Cognizant Recruitment Process

Interview Rounds

Generally, there are three rounds in the recruitment process at Cognizant. They are,

  • Aptitude Test
  • Technical Round
  • HR Interview

Aptitude Test

It is necessary for applicants to any job role to take the aptitude test, which consists of the following sections:

  • Quantitative Ability: Basic Mathematics, Applied Mathematics, and Engineering Mathematics.
  • Logical Reasoning: Objective Reasoning, Pattern Recognition, Number Series, etc.
  • English and Grammar: Vocabulary, Error Identification, Comprehension reading, etc.

It also covers skill-based assessment in the following topics:

  • Programming languages, algorithms, and data structures.
  • Databases and Web UI.

Technical Round

Being up to date on the latest technical advancements is an extra benefit.

While you don’t have to be an expert in every programming language—C++, Java, or Python are just a few examples—you should have enough experience in at least one of them. 

Fundamental knowledge of current technological trends, such as big data, artificial intelligence (AI), and so forth, is required.

HR Interview

The interview panel will inquire about your personality, work experience, hobbies, education, family background, internships, and other subjects throughout the HR process. 

Get ready to respond to inquiries about projects, volunteer work, extracurricular activities, and internships that you have listed on your resume.

Sample HR Interview Questions

Tell me about yourself.

  • If you are a beginner, start with your academics, projects, accomplishments, other curriculum activities, and your abilities. Tell them about your background, interests, and other details as well. 
  • If you’re an experienced professional, begin with your current role, accomplishments, and prior employment history; follow with your educational background and personal details.

Willing to relocate anywhere in India?

Sample Answer: Relocating allows me to experience a new environment, culture, and individuals with whom I may learn new things and develop my talents.

What are your strengths?

You should identify your strengths and weaknesses before the interview. You may add adaptability, teamwork, problem-solving, honesty, patience, etc.

Why should we hire you?

Emphasize the accomplishments, experience, and pertinent skills that make you the most qualified candidate for the position. 

Sample Answer: I am a dedicated worker who wants to see your business grow; thus, you should hire me. I am ready to learn and advance with your team, and I possess the knowledge and expertise required for the position.

Which aspects of this line of work appeal to you personally?

Sample Answer: 

I really enjoy the [aspect of your job].

Being a member of a team that is pursuing [the company’s vision or values] is incredibly fulfilling for me, as I firmly believe in it.

What is your final year project about? What fresh concepts did you offer for this project?

Sample Answer: Select a subject that interests you greatly and is connected to your field of study. It’s also advisable that your topic have compelling motivation. An initiative that benefits humanity, for example, will be truly unique.

What makes you want to change jobs? 

Make sure you don’t disparage or criticize the business you now work for. Saying that you are leaving your current job to further your career is the simplest way to respond to this inquiry. 

What is your expected salary?

Before applying for the role, prepare to answer this question. Below are the keys:

  • Examine salary patterns for the role and the market.
  • Give a range of salaries as opposed to a precise sum.
  • Quietly rephrase the query.
  • Let’s now provide a number instead of a range.
  • Be honest at all times.

Cognizant Technical Interview Questions for Freshers

1. What is data type?

An attribute of the data is its type. It makes it easier for the computer to comprehend how the data in the code will be used.

2. Describe the idea of pointers in C.

A pointer is a variable that stores the address of another variable. It is employed to make oblique references to the variables. It enables the manipulation of the values. 

3. What is an array?

A group of related components kept together in a continuous memory block is called an array. By using an index, one can access the data kept in memory. Large volumes of data are kept in memory using arrays.

4. Describe Abstraction.

Abstraction is the process of just showing the end user the data and implementation that are truly needed.

5. Describe inheritance.

It is a process that enables one thing to take on all the traits and attributes of another. The class that inherits is referred to as a derived class or subclass, whereas the class used for inheritance is known as the base class or superclass.

6. What is constructor overloading?

It can be characterized as having several constructors, each capable of executing a distinct task, and each constructor having a unique set of parameters. These constructors need to be signed uniquely, and they need to receive a separate set of arguments to compile without errors.

public class Employee {  

int uid;  

String name;    

Employee()   {  

System.out.println(“this a default constructor”);  

}  

Employee(int i, String n){  

uid = i;  

name = n;  

}  

public static void main(String[] args) {  

//object creation  

Employee s = new Employee();  

System.out.println(“\nDefault Constructor values: \n”);  

System.out.println(“Employee uid : “+s.uid + “\nEmployee Name : “+s.name);  

System.out.println(“\nParameterized Constructor values: \n”);  

Employee Employee = new Employee(10, “John”);  

System.out.println(“Employee uid : “+Employee.uid + “\nEmployee Name : “+Employee.name);  

}  

7. Describe virtual functions.

A virtual function is a member function that is declared in the base class and overrides that member function in the derived class. Runtime polymorphism is achieved with the aid of virtual functions.

Guidelines to remember when using virtual functions

  • It can’t remain motionless.
  • It must be accessible using a reference or pointer to the base class.
  • Virtual constructors are not possible for classes, although virtual destructors are.

8. What is SQL?

We refer to Structured Query Language (SQL) as such. It is the language that is employed in database manipulation. The SQL has many categories.

  • DDL
  • DML
  • TCL

9. Create a program to determine a number’s power. 

public class powerNumber {  

public static void main(String[] args)   

    {  

        int result=1, n;  

        Scanner sc = new Scanner(System.in);  

        System.out.println(“the Exoponent is:- “);  

        n=sc.nextInt();  

        System.out.println(“the base is:- “);  

        int base = sc.nextInt();            

        while (n != 0)  

    {  

        result *= base;  

        –n;  

    }  

        System.out.println(“Power of Number is:-” +result);    

    }

10. Create a Java program that reverses a number.

package javaapplication6;  

import java.util.Scanner;  

public class JavaApplication6 {  

    public static void main(String[] args)   

    {  

        int i, temp, sum=0, n;  

        Scanner sc = new Scanner(System.in);  

        n=sc.nextInt();  

        temp=n;  

        while(n>0)  

        {  

            int r = n%10;  

            sum = sum*10+r;  

            n = n/10;  

        }  

        System.out.println(“Reverse of Number is:-” +sum);  

    } }  

Cognizant Interview Questions and Answers for Experienced

11. What is a brouter, also referred to as a bridge router?

A bridge router, sometimes known as a brouter, is a type of network equipment that can function as both a router and a bridge. The brouter routes only packets for known protocols; it forwards all other packets as a bridge.

  • When it comes to non-routable protocols, brouters function at the data link layer; routable protocols function at the network layer.
  • Brouters handle both routable and non-routable properties, acting as bridges for non-routable protocols and routers for routable protocols. 
  • In networking systems, brouters are connecting devices that act as the internet’s router and network bridge.

12. Explain EGP.

Network reach-ability information can be shared across Internet gateways from different autonomous systems or the same system via the Exterior Gateway Protocol (EGP).

EGP accomplishes three main goals:

  • Make a group of adjacent people.
  • Check up with the neighbors to make sure they are still living and can be reached.
  • Inform your neighbors about the networks that their independent systems can access.

13. What is the Hamming Code?

A collection of error-correction codes called the Hamming code is useful for identifying and resolving issues that may occur during the transfer or storage of data between different sources.

  • To make sure that no binary bits are lost during the data transfer, redundant bits are extra bits that are manufactured and added to the bits that transport information. 
  • To confirm that the total number of 1s in binary data is even or odd, a parity bit is added. 
  • The process of error detection uses parity bits. 

In essence, the Hamming Code uses extra parity bits to enable mistake detection.

14. What is BufferedWriter? What are flush() and close() used for?

One source of temporary data storage is BufferedWriter. It creates a buffered character output stream with the output buffer size set to default.

  • Characters from the buffered writer stream can be flushed to a file using the flush() function of the Java BufferedWriter class.
  • It guarantees that every data item is written to the file, including the final character.
  • The Java BufferedWriter class’s close() function terminates the buffer stream after flushing the characters out of it. 
  • An error will be raised if the write() and append() methods are called after the stream has been closed.

15. What is a monkey patch in Python?

Python classes and modules can be dynamically altered, often known as runtime, using monkey patches. In Python, we can modify the way that code behaves during execution.

Example:

# m.py

class A:

    def func(self):

          print (“func() is called”)

The code below uses the aforementioned module (m) to assign a new value to func() at runtime, changing its functionality.

import m

def monkey_func(self):

    print (“monkey_func() is called”)  

# replacing the address of “func” with “monkey_func”

m.A.func = monkey_func

ob = m.A()

# calling the function “func”

ob.func()

Output

monkey_func() is called

16. Create a C++ program that prints numbers 0 through 100 without the use of loops or recursion.

In C++ templates, non-data types can also be used as parameters. A value is referred to as a “non-datatype” instead of a datatype. 

Example: N is supplied as a value rather than a datatype in the code that comes before it. Generic classes are formed at build time, and an instance is constructed for each parameter.

#include <iostream>

using namespace std; 

template<int n>

class PrintZeroToN

{

public:

   static void display()

   {

       PrintZeroToN<n-1>::display();  // this should not be mistaken for recursion

       cout << n << endl;

   }

};

template<>

class PrintZeroToN<0>

{

public:

   static void display()

   {

       cout << 0 << endl;

   }

};

int main()

{

   const int n = 100;

   PrintZeroToN<n>::display();

   return 0;

}

17. Without utilizing the string functions, write the code to determine a string’s length. 

#include <iostream>

using namespace std;

int main()

{

      char str[100];

      int len = 0;

      cout << “Enter a string: “;

      cin >> str;

      while(str[len] != ‘\0’)

      {

             len++;

      }

      cout << “Length of the given string is: ” << len;

      cout << endl;

      return 0;

}

18. If you don’t have a pointer, how will you print a variable’s address?

Any variable’s address can be obtained by using the “address of operator” (&) operator, which returns the address of the variable. 

#include <stdio.h>

int main(void)

{

   // declaring the variables 

   int x;

   float y;

   char z;

   printf(“Address of x: %p\n”, &x);

   printf(“Address of y: %p\n”, &y);

   printf(“Address of z: %p\n”, &z);

   return 0;

}

19. In the context of database management systems, what do you know about proactive, retroactive, and simultaneous updates?

Proactive Updates: These are database modifications carried out before the database is utilized in an actual setting.

Retroactive Updates: A database receives these updates after it has been used in a real-world setting.

Simultaneous Updates:  The database receives these updates at the same time as they start to work in the real world.

20. Write down the actions needed to add, modify, and remove a view in SQL.

A view in SQL is a single table that has information from other tables in it. As a result, a view includes fields from one or more tables together with rows and columns that are exact replicas of genuine tables. 

Create a view:

CREATE VIEW View_Name AS

SELECT Column1, Column2, Column3, …, ColumnN

FROM Table_Name

WHERE Condition;

Update a view:

CREATE VIEW OR REPLACE View_Name AS

SELECT Column1, Column2, Column3, …, ColumnN

FROM Table_Name

WHERE Condition;

Drop a view:

DROP VIEW View_Name;

Conclusion

Cognizant takes pride in the accomplishments of its employees and is dedicated to supporting their personal and professional growth by offering clear role enhancement programs, career planning, chances for career advancement through additional education or industry certifications, and opportunities to apply for open positions at Cognizant. We hope these Cognizant interview questions and answers will be helpful for you. Explore a wide range of Cognizant opportunities through our placement training institute in Chennai.

Share on your Social Media

Just a minute!

If you have any questions that you did not find answers for, our counsellors are here to answer them. You can get all your queries answered before deciding to join SLA and move your career forward.

We are excited to get started with you

Give us your information and we will arange for a free call (at your convenience) with one of our counsellors. You can get all your queries answered before deciding to join SLA and move your career forward.