logo

Cognizant Interview Preparation and Recruitment Process


About Cognizant


Cognizant is a global multinational company specializing in information technology (IT) services, consulting, and business process outsourcing. Headquartered in Teaneck, New Jersey, USA, it was originally founded in 1994 as an in-house technology unit of Dun & Bradstreet in Chennai, India. The company began as a joint venture called Dun & Bradstreet Satyam Software (DBSS), with Dun & Bradstreet holding a 76% stake and Satyam Computers owning 24%. Over time, it evolved into Cognizant Technology Solutions, becoming an independent entity after a series of corporate restructurings, including an initial public offering in 1998. Today, it is publicly traded on the NASDAQ-100 under the ticker symbol CTSH.

Cognizant Interview Preparation and Recruitment Process


Key Details About Cognizant :

  • Founded: 1994

  • Headquarters: Teaneck, New Jersey, USA

  • CEO: Ravi Kumar S (as of 2024)

  • Employees: Over 350,000 worldwide

  • Revenue: Approximately $19 billion (2023)

  • Industry: IT Services, Consulting, Digital Transformation


Services Provided :

  1. Digital Transformation – AI, cloud computing, IoT, automation

  2. IT Consulting & Services – Application development, cybersecurity, DevOps

  3. Business Process Outsourcing (BPO) – Finance, HR, customer support

  4. Healthcare & Life Sciences IT – Data analytics, patient management solutions

  5. Banking & Financial Services IT – Risk management, blockchain, fraud detection

  6. Retail & Manufacturing Solutions – Supply chain optimization, e-commerce tech



Cognizant recruits its employees in two ways :


1. On-campus Recruitment

* Aptitude
* Programming
* HR

2. Off-campus Recruitment

* Aptitude
* Programmin


Eligibility Criteria :


* An applicant must have more than 60% marks in 10th and 12th (or diploma).
* An applicant must have a minimum of 60% marks in graduation.
* After HSC(12th), but not after SSC(10th), or between semesters of graduation, a maximum interval of one year is permitted.
* Graduation and post-graduation in BE, B Tech, ME, M Tech, MCA
* At the time of the Cognizant selection process, a candidate should not have any pending backlogs.



Cognizant Recruitment Process (For Freshers & Experienced Candidates) :

 

Cognizant follows a structured recruitment process for hiring freshers and experienced professionals. The process may vary slightly depending on the role, location, and experience level, but the general steps remain consistent.


1. Online Application

  • Candidates apply through Cognizant's official career portal (https://careers.cognizant.com) or via job portals like LinkedIn, Naukri, etc.

  • Some fresher roles are filled through on-campus recruitment drives in colleges.


2. Online Assessment (Aptitude & Coding Test)

Depending on the role, candidates take one or more of the following tests:

  • Aptitude Test: Logical reasoning, quantitative ability, and verbal skills.

  • Coding Test: Programming problems (for IT roles) in languages like Java, Python, C, or C++.

  • Domain-Specific Test: For specialized roles (e.g., data science, cloud, cybersecurity).

The test is usually conducted on platforms like AMCAT, Cognizant’s own assessment platform, or HirePro.


3. Technical Interview

  • Candidates who clear the online test are invited for a technical interview (virtual or in person).

  • Topics covered:

    • For IT roles: Data structures, algorithms, OOPs concepts, database management, cloud computing, and project-related discussions.

    • For non-IT roles: Industry-specific knowledge, problem-solving skills, and case studies.

  • Freshers may be asked about their final year projects and internships.


4. HR Interview

  • General discussion about salary expectations, work culture, job location, and career goals.

  • Questions related to communication skills, teamwork, adaptability, and behavioral situations.


5. Offer & Onboarding

  • Selected candidates receive an offer letter via email.

  • Background verification is conducted before joining.

  • Freshers are onboarded through Cognizant Academy for training.


Hiring Programs & Designations at Cognizant :


For Freshers (Campus Hiring)
  1. GenC (General Category)

    • Eligibility: B.E/B.Tech, M.E/M.Tech, MCA, M.Sc (CS/IT)

    • Entry-level IT roles with training.

  2. GenC Elevate

    • Higher package than GenC.

    • For candidates with advanced skills in digital technology.

  3. GenC Pro

    • For candidates with specialized skills in AI, Data Science, Cloud, etc.

  4. GenC Next

    • Highest package for freshers.

    • For highly skilled coders who clear hackathon-style coding rounds.


Tips to Crack Cognizant's Recruitment Process :


* Practice aptitude and logical reasoning questions
regularly.
* Improve coding skills if applying for technical roles (LeetCode, CodeChef, HackerRank).
* Prepare well for technical interviews by revising DSA, OOPs, DBMS, and cloud computing basics.
* Enhance communication and soft skills for HR rounds.
* Research about Cognizant’s latest projects, clients, and technologies to make a good impression.

Cognizant Interview Questions :

1 .
What is a pointer? Define it.
Pointer is a variable which stores the address of other variables which hold some value in it. Directly pointer is used to point values of variables indirectly. We can manipulate its values.
2 .
What is a dangling pointer in C?
Dangling pointer is a pointer which does not point to a valid object of the appropriate type. It appears when a pointer is in the stack but not in the memory in a heap. Char *p =NULL; A dangling pointer attempt to deallocate without allocating space will result in a segmentation fault.

Dangling pointers arise during object destruction, when an object that has an incoming reference is deleted or deallocated, without changing the data of the pointer, so that the pointer points to the memory location of the deallocated memory.
3 .
What is a data type?
Data Type defines the type of value which are allocated by us to a variable and have a range in between we assign values. E.g., "Int" it is a data type which able to store data between "-32768 to +32768" in C.
4 .
What is malloc?
Allocates requested size of bytes and returned a pointer first byte of allocated space. Malloc is using for dynamic memory allocation.

Syntax :
ptr = (cast-type*) malloc(byte-size)  ?
5 .
"/0" in a string?
This symbol shows the ending of the string.

E.g : char a[] = {"s","e","t","/0"};.
6 .
What is the difference between a pre-increment operator and post-increment operator?
Pre-increment operator used incrementing the variable value by one before assigning the cost to the variable. Post-increment operator use to incrementing the variable value by one after assigning the value to the variable.
7 .
What are the key features or characteristics OFC language?
* Reliability
* Portability
* Flexibility
* Interactivity
* Modularity
* Efficiency and Effectiveness
8 .
What is embedded C?
* Embedded C is the extension of C programming language.

* Embedded C is used to develop microcontroller-based applications.

* Embedded C includes features not available in standard C like fixed-point arithmetic, named address spaces, and necessary I/O hardware addressing.

* Cell phones, MP3 players are some example of embedded systems in which integrated C is used to program and control these devices.
9 .
What is the difference between variable declaration and variable definition in C?
* Variable declaration tells the compiler about data type and size of the variable. Whereas, variable definition allocates memory to the variable

* Variable can be declared many times in a program. But, the definition can happen only one time for a variable in a program.

* Variable declaration is for assignment of properties and identification to a variable. Whereas, a variable definition is for assignments of storage space to a variable
10 .
Which level is C language belonging?
* C language is belonging to middle-level language. C language behaves as a bridge between machine level (low level) languages and high-level languages.

* C language is more user-friendly than machine level languages. And, C language does not support all the concepts that high-level languages offer. So, C programming language called as middle-level language.
11 .
What is the difference between structured oriented, object-oriented and non-structure oriented programming language?
Structured oriented programming language :

* In this type of language, large codes fragmented into small programs called functions.
* The main focus is on procedures and functions that operate on values
* Data moves without any restrictions around the systems from one procedure to another
* Program structure follows "Top-Down Approach."
* Example: C, Pascal, ALGOL, and Modula-2

Object-oriented programming language :

* In this type of language, programs fragmented into objects
* The main focus is on the data/values that are manipulating and not on the procedures or functions.
* Data is hidden from functions and cannot access by external functions
* Program structure follows the "Bottom UP Approach."
* Example: C++, and C# (C sharp)

Non-structure oriented programming language :

* There is no specific structure rule for programming this language.
* Example: BASIC, COBOL, FORTRAN
12 .
What is modifier in C?
* Modifiers derive the space to allocate for a variable.

* Modifiers are fixed with basic data types to modify (either increase or decrease) the amount of storage allocated to a variable.

* For example, storage requirements for int data type are 4 bytes for a 32-bit processor. We can increase range by using long int data type which is 8 byte. We can decrease the range by using short int which is 2 byte.
13 .
What is the constructor?
A constructor is a method which is used to initialize a newly created object and is called just after when memory allocated to the object. It can be used to implement the objects to desired values or default values at the time of object creation.
14 .
What is encapsulation?
Encapsulation is one of the primary concepts in object-oriented programming. It describes the idea of combining data in a single class and methods that work on that data, e.g., a class which is a blueprint in java. This concept is also often used to preserve the internal state, of an object from the outside.
15 .
What is the destructor?
A destructor used when the initialized object is destructing it called automatically during the destruction of an object. It helps in recovering the heap space and remove files.
16 .
What are virtual Functions?
In object-oriented programming, in languages such as C++, and Object Pascal, a virtual function or virtual method is an inheritable and overrideable function or method for which dynamic dispatch facilitated. This concept is an essential part of the (runtime) polymorphism portion of object-oriented programming (OOP).
17 .
What is overloading in OOPs?
Overloading is a process used to avoid redundant code where the same method name used multiple times but with a different set of parameters. The actual method that gets called during runtime is resolved at compile time, thus avoiding runtime errors.
18 .
Write the code to add two numbers without using arithmetic operators.
The sum of two bits can be found by executing an XOR (^) operation on the two bits. A carry bit can be obtained by performing AND (&) on the two bits.

The logic shown below is a simple Half Adder that may be used to add two single bits. This logic can be extended to integers. If there are no set bits at the same position(s) in a and b, bitwise XOR (^) of a and b yields the sum of a and b. Bitwise AND (&) is used to include common set bits as well. All carry bits are obtained by bitwise AND of a and b. To acquire the needed result, we compute (a & b) << 1 and add it to a ^ b.
// C Program for adding two numbers
// without the use of arithmetic operators
#include<stdio.h>

int Addition(int a, int b)
{
   // Iterate until no carry
   while (b != 0)
   {
       // carry now stores common
       //set bits of a and b
       unsigned carry = a & b;

       a = a ^ b;

       // Carry to be shifted by one so that on adding
       // it to a, we get the required sum
       b = carry << 1;
   }
   return a;
}?
19 .
What is a bridge router (als known as brouter)?
A bridge router, sometimes known as a brouter, is a network device that can function as both a bridge and a router. The brouter forwards all other packets like a bridge and only routes packets for known protocols.

For routable protocols, brouters function at the network layer, while for non-routable protocols, they operate at the data link layer. Brouters operate as routers for routable protocols and bridges for non-routable protocols, handling both routable and non-routable characteristics. Brouters are connecting devices in networking systems that serve as both a network bridge and a router in the internetwork.
20 .
What is Exterior Gateway Protocol (EGP)?
The Exterior Gateway Protocol (EGP) is a protocol that allows Internet gateways from the same or separate autonomous systems to share network reach-ability information.

EGP serves three primary purposes :

* Create a set of neighbors.
* Keep a check on the neighbors (to see if they are still alive and reachable).
* Notify the neighbors about the networks that are accessible from their autonomous systems.
21 .
What is the Hamming Code?
The Hamming code is a set of error-correction codes that can be used to detect and fix errors that can arise when data is transferred or stored from one source to another. Redundant bits are extra binary bits that are created and added to the data transfer's information-carrying bits to ensure that no bits are lost during the data transfer. A parity bit is a bit that is appended to binary data to verify that the total number of 1s is even or odd. Error detection is done with parity bits. The Hamming Code is essentially the use of additional parity bits to allow for error detection.
22 .
What do you know about Network Virtual Terminal (NVT)?
Rather than communicating in native "languages", all Telnet clients and servers agree to deliver data and commands that conform to a fictional "virtual" terminal type known as the Network Virtual Terminal (NVT). The NVT specifies a set of standards for formatting and sending data, including character set, line termination, and how information about the Telnet session is provided.

Every Telnet client on a terminal can communicate in both its native language and NVT. When a user enters information on his or her local terminal, it is translated to NVT and sent over the network in that format. When the Telnet server receives this information, it converts it from NVT to the format required by the remote host. In reverse, the same procedure is followed for transmissions from the server to the client.
23 .
What is BufferedWriter? What are flush() and close() used for?
BufferedWriter is a temporary data storage source. It's used to make a buffered character output stream with the default output buffer size.

To flush characters from the buffered writer stream to a file, the flush() function of the BufferedWriter class in Java is employed. It ensures that all data items, including the last character, are written to the file.

The close() function of the Java BufferedWriter class flushes the characters from the buffer stream and then closes it. Calling methods like write() and append() after the stream has been closed will generate an error.
24 .
What is the purpose of a Pseudo TTY (pseudo terminals)?
A bidirectional communication channel is provided by a pair of virtual character devices known as a pseudo TTY (or "PTY"). The master is at one end of the channel, while the slave is at the other. The pseudo-terminal's slave end provides an interface that is identical to that of a conventional terminal. A process that expects to be connected to a terminal can open the slave end of a pseudo-terminal, which will subsequently be controlled by a program that has opened the master end. Anything written on the master end is supplied to the slave end's process as if it were any input entered on a terminal. Anything written to the slave end of the pseudo-terminal, on the other hand, can be read by the process linked to the master end. Network login services, terminal emulators, and other such applications employ pseudo-terminals.
25 .
Is it possible to «resurrect» an object that has become eligible for garbage collection in Java?
The Garbage Collector (GC) must call the finalize method on an object when it becomes garbage collection eligible. Because the finalize method can only be used once, the GC marks the object as finalized and sets it aside until the next cycle.

You can technically "resurrect" an object in the finalize method by assigning it to a static field, for example. The object would revive and become ineligible for garbage collection, preventing the GC from collecting it in the next cycle.

The object, on the other hand, would be marked as finalized, thus the finalize method would not be invoked when it became eligible again. In essence, you can only use this "resurrection" method only once.

Example :
// Java Program to illustrate Object Resurrection

import java.io.*;
import java.util.*;

public class InterviewBit {

   private int num;

   // Constructor
   public InterviewBit(int num)
   {

       // assigning the parameter value to the member variable
       this.num = num;
   }

   // Creating an ArrayList of class object
   static final ArrayList ar = new ArrayList();

   protected void finalize() throws Throwable
   {

       System.out.println("Resurrect " + num);

       // By using the this operator, adding the current instance to object
       ar.add(this);
   }

   public String toString()
   {

       return "Element("
           + "number = " + num + ')';
   }
   public static void main(String[] args)
       throws InterruptedException
   {

       for (int i = 0; i < 3; i++)
           ar.add(new InterviewBit(i));
       for (int j = 0; j < 5; j++) {

           // printing the element in the object
           System.out.println("The Elements are : " + ar);

           // Clearing off elements
           ar.clear();

           // Calling the garbage collector function
           System.gc();

           // Making the thread to sleep for 500 ms
           Thread.sleep(500);
       }
   }
}

Output :
The Elements are : [Element(number = 0), Element(number = 1), Element(number = 2)]
Resurrect 2
Resurrect 1
Resurrect 0
The Elements are : [Element(number = 2), Element(number = 1), Element(number = 0)]
The Elements are : []
The Elements are : []
The Elements are : []


Explanation :
The finalize method adds the items to the collection once and then resurrects them. They have been marked as finalized and will not be queued again when they are collected a second time.
26 .
Is it possible to override and overload a static method in Java? Is it possible to override a private method in Java?
Because static methods are resolved at compile time, one cannot override them in Java. Because objects are only available at runtime, overriding requires a virtual method that is resolved at runtime. In Java, a static method can be overloaded. Overloading has nothing to do with runtime, but each method's signature must be distinct. To alter the method signature in Java, either the number of parameters, the type of arguments, or the sequence of arguments must be changed.

In Java, you can't override a private method because the subclass doesn't inherit the private method, which is required for overriding. In fact, no one outside the class can see a private method, and a call to it is handled at compile time using Type information rather than at runtime using the actual object.
27 .
What is stored in each of the memory structures- stack and heap, and how are they related to each other?
The stack is a section of memory that stores information about nested method (recursive)  calls all the way down to the present program location. It also holds all local variables and heap references defined in the currently running procedures. This structure enables the runtime to return from the method knowing the address from which it was invoked, as well as to remove all local variables when the procedure has been exited. Every thread has a stack of its own.

The heap is a big chunk of memory used for dynamic allocation. When you use the new keyword to create an object, it is allocated on the heap. The reference to this object, on the other hand, is stored on the stack.
28 .
Write a program to reverse any number.
This code below is written in Java.
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);  
        if(temp==sum)  
        {  
            System.out.println("Palindrom");  
        }  
        else  
        {  
            System.out.println("Not Palindrom");  
        }  
    }  
}
29 .
Write a program to find out some of the digits of the given 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+r;  
            n = n/10;  
        }  
        System.out.println("Reverse of Number is:-" +sum);   
    }    
}  
30 .
Write a program to subtract two numbers without using a subtraction operator.
package javaapplication6;  
import java.util.Scanner;  
     public class JavaApplication6 {  
   static int Add(int x, int y)   
    {   
        while (y != 0)    
        {   
            int borrow = ~ x & y;   
    
            x = x ^ y;   
    
            y = borrow << 1;   
        }   
        return x;   
    }   
        
    public static void main(String arg[])    
    {   
        Scanner sc = new Scanner(System.in);  
        System.out.println("First value is:- ");  
        int a=sc.nextInt();  
        System.out.println("Second value is:- ");  
        int b=sc.nextInt();  
        System.out.println("Sum of both digits:- "+Add(a, b));   
    }   
    }
31 .
Write a program to find out the power of a number.
package javaapplication6;  
import java.util.Scanner;  
public class JavaApplication6 {  
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);    
    }  
} 
32 .
Write a program to add two numbers without using the addition operator.
package javaapplication6;  
import java.util.Scanner;  
public class JavaApplication6 {  
   static int Add(int x, int y)   
    {   
        while (y != 0)    
        {   
            int carry = x & y;   
            x = x ^ y;   
            y = carry << 1;   
        }   
        return x;   
    }    
    public static void main(String arg[])    
    {   
        Scanner sc = new Scanner(System.in);  
        System.out.println("First value is:- ");  
        int a=sc.nextInt();  
        System.out.println("Second value is:- ");  
        int b=sc.nextInt();  
        System.out.println("Sum of both digits:- "+Add(a, b));   
    }   
}  
33 .
What is monkey patch in Python?
Monkey patches are dynamic (or run-time) alterations of a class or module in Python. We can truly change the behavior of code at runtime in Python.

Example :
# m.py
class A:
    def func(self):
          print ("func() is called")
In the code below, we use the above module (m) to change the behavior of func() at runtime by assigning a new value.

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


Explanation :  We have assigned the monkey_func to the address of “func” of class A. Thus, when we call the “func” function of “ob”, the monkey function is called.
34 .
List the differences between RSA (Rivest, Shamir, Adleman) and Digital Signature Algorithm (DSA).
RSA DSA
RSA is a cryptosystem algorithm. DSA is a digital signature algorithm.
This algorithm finds its application in secure data transmission. This algorithm finds its application in digital signature and its verification.
It implements the mathematical concept of factorization of the product of two large prime numbers. It implements the concept of modular exponentiation and discrete logarithm.
RSA is slower in key generation as compared to DSA. DSA is faster in key generation as compared to RSA.
RSA is faster in encryption but slower in decryption as compared to DSA. DSA is slower in encryption but faster in decryption as compared to RSA.
35 .
Write a code to print numbers from 0 to 100 in C++ without using loop and recursion.

Template Metaprogramming is the idea used in this code.

Let's have a look at how this works. Non-data types can also be used as parameters in C++ templates. The term "non-datatype" refers to a value rather than a datatype. In the preceding code, for example, N is passed as a value rather than a datatype. For each parameter, a new instance of a generic class is constructed, and these classes are created at compile time.
#include 
using namespace std;
 
template
class PrintZeroToN
{
public:
   static void display()
   {
       PrintZeroToN::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::display();
   return 0;
}

Explanation : N is passed as a value rather than a data type in the above program. For each parameter, a new instance of a generic class is constructed, and these classes are created at compile time. When the compiler encounters the line “PrintZeroToN<>::print()” with N = 100, it produces an instance PrintZeroToN<100>. Another function PrintZeroToN<99>::print() is called in function PrintZeroToN<100>::print(), resulting in the creation of an instance PrintZeroToN<99>. All instances from PrintZeroToN<100> to PrintZeroToN<1> are created in the same way. The function PrintZeroToN<0>::print() already exists and prints 0. The PrintZeroToN<1> function prints 1 and so on. As a result, all numbers from 0 to N are printed on the screen
36 .
How does Dynamic Loading help in better memory space utilization?
In dynamic loading, a routine is not loaded until it is called. This strategy is very effective when dealing with vast quantities of code, such as error routines, that occur infrequently. All routines are saved in a relocatable load format on the disk. The main program is executed after it has been loaded into memory. When a routine requires to call another routine, the calling routine checks to verify if the other routine is loaded first. If this is not the case, the relocatable linking loader is used to load the requested routine into memory and update the program's address tables. The newly loaded routine is then given control. In this way, dynamic loading helps in better memory space utilization.
37 .
Write the code to find the length of a string without using the string functions.
#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;
}
38 .
What do you understand about Proactive, Retroactive and Simultaneous Update in the context of DBMS?
Proactive Updates : These changes are made to the database before it is put into use in the real-world environment.

Retroactive Updates : These updates are applied to a database after it has been operational in the real-world environment.

Simultaneous Updates : These updates are applied to the database at the same moment as they become functional in the real-world environment.
39 .
List out the differences between Generalization and Specialization in DBMS.
GENERALIZATION SPECIALIZATION
Generalization uses a Bottom-Up approach. Specialization uses a top-down approach.
The size of the schema gets reduced in Generalization. The size of the schema gets increased in Specialization.
Generalization is usually applied to a group of entities. Specialization can be applied to a single entity.
The practice of forming groupings from diverse entity sets is known as Generalization. The process of forming subgroups inside an entity set is known as Specialization.
In Generalization, in order to form a higher entity, the differences and similarities between lower entities are ignored and their union is considered. In Specialization, lower entities are formed by splitting higher entities.
Inheritance does not exist in Generalization. Inheritance exists in Specialization.
Example: Consider the ideas of a Student and a Patient. These two entities will have distinct properties. Student entities, for example, will have Roll No, Name, and Mob No attributes, whereas patient entities will have PId, Name, and Mob No attributes. In this case, the Name and Mob No of both the Student and the Patient can be joined as a Person to construct a higher-level entity, which is known as the Generalization Process. Example: Consider the account of a person as an entity. This will have some properties, such as Acc No and Balance. Other properties of the account entity, such as Current Acc and Savings Acc, may exist. Now that Current Acc has Acc No, Balance, and Transactions, and Savings Acc has Acc No, Balance, and Interest Rate, we may argue that specialized entities inherit characteristics from higher-level entities.
40 .
How will you print the address of a variable without using a pointer?
We may acquire the address of any variable by using the “address of operator” (&) operator, which yields the variable's address.
#include 
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;
}
41 .
What exactly is index hunting, and how does it aid query performance?
Index hunting is the method of boosting a collection of indexes. This is done because indexes improve query performance as well as query processing time.

It aids in query performance improvement in the following ways :

* Using the query optimizer, the optimal queries are suggested.
* To check the effect, parameters such as index, query distribution, and performance are used.
* Databases are optimized into a small group of problem queries
42 .
What is the fill factor in SQL? What is its default value?
The fill factor is the percentage of space on each leaf-level page that will be filled with data. The smallest unit in SQL Server is a page, which is made up of 8K pages. Depending on the size of the row, each page can store one or more rows. The Fill Factor's default value is 100, which is the same as the value 0. The SQL Server will fill the leaf-level pages of an index with the highest number of rows it can fit if the Fill Factor is set to 100 or 0. When the fill factor is 100, the page will have no or very little vacant space.
43 .
What are the similarities and the differences between Shortest Job FIrst (SJF) and Shortest Remaining TIme FIrst (SRTF) CPU scheduling algorithms?
SJF (Shortest Job First) is a scheduling policy that prioritizes the waiting process with the shortest execution time. Shortest Job Next (SJN) or Shortest Process Next are other names for it (SPN). It is a scheduling algorithm that is not preemptive (that is, one process cannot snatch the resources assigned to a currently running process).

The preemptive variant of SJF scheduling is the Shortest Remaining Time First (SRTF). The procedure, next in the queue, with the least amount of time till completion is chosen to be executed in this scheduling technique. Processes that arrive at the same time transform SRTF to SJF.

Similarities :

* Both SJF and SRTF are essentially difficult to implement since the processes' burst time cannot be predicted.
* Both SJF and SRTF have the potential to cause process starvation since long processes can be delayed forever if short processes are constantly added.
* Once all of the processes are in the ready queue, both SJF and SRTF are regarded the same. This is because no preemption is performed after the processes are added to the ready queue.

Shortest Job First Shortest Remaining Time First
SJF is a non-preemptive algorithm. SRTF is a preemptive algorithm.
SJF involves less overheads than SRTF. SRTF involves more overhead than SJF.
SJF results in comparatively lower throughput. SRTF results in increased throughput as execution is faster.
SJF reduces the average waiting time for each process. SRTF may or may not reduce the average waiting time for each process.
SJF involves a lesser number of context switching. SRTF involves a greater number of context switching.
44 .
What is caching? How does caching work?
Caching is a technique for saving numerous copies of the most frequently used data in a temporary storage area (or cache) so that they can be accessed more quickly. It keeps data in a temporary format for software applications, servers, and web browsers, so users don't have to download information every time they visit a website or use an application.

Cached data works by saving data in a device's memory for later access. The data is kept in the memory of a computer, directly below the central processing unit (CPU). The primary cache level is incorporated into a device's microprocessor chip, followed by two more secondary cache levels that feed the primary level. This information is kept until the content's time to live (TTL), which specifies how long it should be cached, expires or the device's disc or hard drive cache fills up.

Data is usually cached in one of two ways: browser or memory caching (data stored locally on the computer) or Content Delivery Networks (data stored in geographically distributed locations).
45 .
What is Root Partition in OS?
The root partition is the place where the operating system kernel is located. Other potentially crucial system files that are mounted during boot time are contained in it as well.
46 .
What is the purpose of a Virtual File System (VFS)?
An abstract layer on top of a more concrete file system is a virtual file system (VFS) or virtual filesystem switch.

* The purpose of a VFS is to make it possible for client applications to access various types of concrete file systems in a consistent manner. For example, a VFS can be used to seamlessly access local and network storage devices without the client device recognizing the difference.

* It can be used to bridge the gap between Windows, traditional Mac OS/macOS, and Unix filesystems, allowing applications to access files on those sorts of local file systems without needing to know what type of file system they're dealing with.

* A VFS defines the kernel's interface with a certain file system. As a result, adding support for new file system types to the kernel is simple.
47 .
Name the typical elements of a processed image.
The typical elements of a processed image are :

User data : This element of user space includes program data, user stack area, and programs that can be modified.

User program :
The set of instructions that are to be executed.

System Stack :
Each process is associated with one or more LIFO (Last In First Out) stacks. Parameters and calling addresses for procedure and system calls are stored here.

Process control Block (PCB) :
Information required by the operating system to control operations.
48 .
What is plumbing/piping in Linux or Unix?
Plumbing/ Piping refers to the technique of using one program's output as an input to another. For instance, Instead of delivering a folder or drive listing to the main screen, it can be piped and delivered to a file, or sent to the printer to print a hard copy.

A pipe is a type of redirection (the transfer of standard output to another location) used in Linux and other Unix-like operating systems to transport the output of one command/program/process to another for additional processing. The Unix/Linux systems allow a command's stdout to be connected to another command's stdin. The pipe character ‘|' can be used to do this.
49 .
What is Trapdoor in OS?
A trapdoor is a software or hardware mechanism that can be used to bypass system controls. In general, it's malicious software that allows an attacker on the other side of the Internet to gain unauthorized access to a computer system or network by accepting remote commands. Trap door software monitors a specific Transmission Control Protocol (TCP) or User Datagram Protocol (UDP) port for orders.
50 .
What is the Translation Lookaside Buffer?
Translation TLB (Transaction Look-aside Buffer) is a particular cache that keeps track of recently used transactions. The TLB includes the most recently used page table entries. The CPU analyses the TLB when given a virtual address. The frame number is retrieved and the real address is created if a page table entry (TLB hit) is present. If a page table entry is missing from the TLB (TLB miss), the page number is used as an index while processing the page table. The TLB first checks if the page is already in main memory; if it isn't, a page fault is generated, and the TLB is then modified to incorporate the new page entry.
51 .
What is Preemptive Multitasking? How is it different from Cooperative Multitasking?
Preemptive multitasking permits computer programs to share operating systems (OS) and underlying hardware resources. It distributes the overall operating and computing time amongst processes, and it uses established criteria to switch resources between processes. Time-shared multitasking is another name for preemptive multitasking.

The operating system never initiates context switching from one process to another in cooperative multitasking. Only when the processes voluntarily cede control on a routine basis, or when they are inactive or logically blocked, does a context switch occur, allowing many applications to run at the same time. In addition, in this multitasking, all processes work together to make the scheduling strategy work.

Cognizant MCQ :

1 .
P is an integer. P is greater than 994. If P -7 is a multiple of 11, then the largest number that will always divide (P+4)(P+15) is
A)
242
B)
321
C)
343
D)
None of the above

Correct Answer :   242


Explanation : p-7= 11*a (as it is multiple of 11)
p=11*(a+7)
So (p+4)*(p+15) = (11a+7+4)*(11a+7+15);
= (11a+11)*(11a+22);
=11*11(a+1)*(a+2);
=121*2
=242

2 .
The greatest number that will divide 65, 134 and 224 to leave the same remainder in each case:
A)
3
B)
5
C)
7
D)
9

Correct Answer :   3


Explanation : The greatest number = H.C.F of (134-65), (224-134),
(224-65)
H.C.F of 69, 90 and 159 = 3.
15 is the greatest number.

3 .
What is the smallest four-digit number which when divided by 6, leaves a remainder of 4 and when divided by 4 leaves a remainder of 3?
A)
1043
B)
1073
C)
1103
D)
None of the above

Correct Answer :   None of the above


Explanation : remainder when m is divided by 4 = 2
Smallest m is 2.
Hence, N = 1001 + 6 * 2 = 1013.

4 .
A set sum of money amounts to Rs.1500 in 2 years and Rs. 1726 in 4 years. Find the sum
A)
Rs850, 10%
B)
Rs900, 12%
C)
Rs1274, 15%
D)
Rs1340, 18%

Correct Answer :   Rs1274, 15%


Explanation : 1726-1500= 226 for 2 years (4-2) so for one year 226/2= 113 then for 2 years interest is 113+113=226 Then principal 1500-226=1274. Now 113/1274*100= 15%.

5 .
The product of 2 numbers is 2028, and the H.C.F. is 13. The number of such pairs is:
A)
2
B)
3
C)
6
D)
9

Correct Answer :   2


Explanation : Let the numbers 13a and 13b.
Then, 13a x 13b = 2028
=> a * b = 12.
Now, the co-primes with the product 12 are (1, 12) and (3, 4). So, the required numbers is (13 x 1, 13 x 12) and (13 x 3, 13 x 4).There are two such pairs

6 .
Find the biggest digit which on dividing 1657 and 2037 leaves the remainders 6 and 5 respectively is:
A)
115
B)
127
C)
135
D)
156

Correct Answer :   127


Explanation : The number we require = H.C.F. of (1657 - 6), (2037 - 5) =H.C.F. of 1651 and 2032 = 127.

7 .
The L.C.M of 2 numbers is 495, and the H.C.F is 5. If the sum of these numbers is 100, then their difference is,
A)
90
B)
34
C)
10
D)
None of the above

Correct Answer :   10


Explanation : Let the numbers be x and (100-x).
Then, x*(100-x) = 5*495-100-x = 5*495
x2-100x+2475=0x2-100x+2475 = 0
(x - 55)*(x - 45) = 0
x = 55 or x = 45
The numbers are 45 and 55
Required difference = (55-45) = 10.

8 .
H.C.F and L.C.M of two numbers are 84 and 21 respectively. If the ratio of the two numbers is 1:4, then the larger of the two numbers is
A)
12
B)
30
C)
48
D)
84

Correct Answer :   84

9 .
The smallest number is given which is a perfect square and contains 7936 as a factor is:
A)
231564
B)
246016
C)
251664
D)
346016

Correct Answer :   246016


Explanation : 7936 => 2^2 * 2^2 * 2^2 * 2^2 * 31^1
To make it as a perfect square, we have to multiply
7936 with 31....
Hence the read no. is 7936*31 = 246016.

10 .
Mina drives from her home to the nearest bus station at an average speed of 80km/h. From the bus station, she boards a bus that takes to her office at a speed of 120km/h. The entire distance covered by her is 92km, and the entire journey took her 1 hour. Find the distance between the bus station from where she boards the bus and her office.
A)
91.97
B)
92.78
C)
94.65
D)
97.35

Correct Answer :   91.97


Explanation : Let from her home to station distance = X, so,
(X \ 80) + ((92-X)/120) = 1
Solving this X = 183.97 km
So from office to station = 183.97-92 = 91.975 km

11 .
Straight line between 2 places is 3000m. A person moves with 6/11km/hour from p to q @12pm and another person moves from opposite direction with speed 5/22km/hour from q to p @ 1pm.when they will meet together?
A)
8.15am
B)
9.10pm
C)
4.17pm
D)
4.18pm

Correct Answer :   4.17pm


Explanation : The person from p moves 6/11 km in 1 hour so 3-6/11=27/11
6/11 t+5/22 t=27/11
17/22 t=27/11
t=54/17 =3.17hso, time=4:17 pm

12 .
How many seconds will a 500-meter long train moving with a speed of 63 km/hour, take to cross a man walking at a speed of 3 km/hour in the direction of the train?
A)
28
B)
30
C)
42
D)
50

Correct Answer :   30


Explanation : train and man is moving in the same direction so the relative speed will be = (63-3) km/hour = 60 km/hour
Then 60 km/hour * 5/18= 50/3 m/sec
Therefore, time = distance/speed
= 500/ (50/3)
= 30 seconds
So the answer is 30 seconds.

13 .
If ax = by, then:
A)
log(a/b) = x/y
B)
log(a) / log(b) = x/y
C)
log(a) / log(b) = y/x
D)
None of the above

Correct Answer :   log(a) / log(b) = y/x

14 .
If log x + log y = log (x + y), then:
A)
x = y
B)
x*y=1
C)
y = (x-1)/x
D)
y = x/(x-1)

Correct Answer :   y = x/(x-1)


Explanation : log x + log y = log (x + y)
log(x*y) = log (x + y)*x*y = x + y
x*y - y = x
(x - 1)*y = x, y = x/(x-1).

15 .
If 0.5(log a + log b) = log{(a + b)/3}, then define the relation between a and b is:
A)
(a + b)2 = 2
B)
a2+b2 = 7ab
C)
a2-b2 = 7ab
D)
(a + b)/3 = (1/2)(a +b)

Correct Answer :   a2+b2 = 7ab


Explanation : 0.5[log(a) + log(b)] = Log[(a + b)/3]
0.5*log(a*b) = log[(a + b)/3]
log[sqrt(a*b)] = log[(a + b)/3]
sqrt(a*b) = (a + b)/3
3*sqrt(a(b) = a + b
9 *a*b = a^2 + 2ab + b^2
7*a*b = a^2 + b^2

16 .
If log x = (1/2) log y = (1/5) log z, the value of x4y3z-2 is:
A)
1
B)
3
C)
5
D)
8

Correct Answer :   1


Explanation : log(x) = (1/2) log(y) => y = x^2
log(x) = (1/5) log(z) => z = x^5
Then x^4*y^5*z^-2 = x^4*x^6*x^-10 = x^10 * x^-10 = x^0 = 1,
If any value has power value as 0 then its overall value is 1.

17 .
If log10000 x = -1/4, then x is given by:
A)
1/5
B)
1/10
C)
1/15
D)
1/20

Correct Answer :   1/10


Explanation : Log10000^x = -1/4
X= (10000)-1/4
10-1 = 1/10.

18 .
How many 5 digit no. can be formed from 0,2,4,5 & 9?
A)
74
B)
85
C)
96
D)
125

Correct Answer :   96


Explanation : 5!-4!
We can arrange those five letters in 5! Way, and If 0 comes at the ten thousand places, it will not be a five digit number. So the possibility of getting 0 at the 1st place is 4! Ways. So we need to subtract this 4! From the 5!.

19 .
The number of times four used while writing the numbers from 1 to 100 is:
A)
16
B)
17
C)
18
D)
19

Correct Answer :   19


Explanation : In the unit's place, starting with 4, 14 ....94, we have nine times 4s used.
Also in 40 - 49, we have 2, ten times in the ten's place.
Hence, total no. of 2s used = 9 + 10 = 19

20 .
Sum of two numbers is 60, and their product is 120. What is the sum of their reciprocals?
A)
1
B)
3
C)
1/2
D)
1/3

Correct Answer :   1/2


Explanation : Given, a + b = 40 and a*b = 120.
Sum of their reciprocals:
1/a+1/b = (a + b)/a*b= 40/120 =1/2.

21 .
Consider some digits in between 10 and 1000 such that when each number is divided by 6, 7 and 11, it leaves five as the remainder in each case. What are the Original numbers?
A)
462
B)
321
C)
256
D)
185

Correct Answer :   462


Explanation : As the number leaves same remained in each case,
∴ required numbers = 5 + (common multiples of 6, 7 and 11)
∴ Consider the LCM of 6, 7 and 11.
LCM = 462
⇒ One of the required numbers = 462.

22 .
A, B, C starts a race at the same time and the same point in the same direction in a stadium. A completes a circle in 125 seconds, B in 150 second and C in 100 seconds. After what time will they cross again at the same point?
A)
15 minutes
B)
25 minutes
C)
35 minutes
D)
45 minutes

Correct Answer :   25 minutes


Explanation : The time at which they will meet again at the starting point will be the LCM of 125, 150 and 100 second. Hence,
LCM [125, 150, 95] = 1500 Seconds = 1500/60 minutes = 25 minutes

23 .
In an exam, 30% of the candidates failed in Science and 45% in History. If 20% failed in both Science and History, then what is the percentage of students who passed in both the subjects?
A)
45
B)
50
C)
55
D)
60

Correct Answer :   45


Explanation : Let circle M represent students who failed in Science
& Let circle E show students who not passed in History
Unshaped part represents students who passed an exam
Now, % of students failed in Science =n(M) = 30% of students failed in History= n(E) = 45% of students failed in both Science & History = n(M∩ E) = 20
We know that the percentage of students who not passed in either one or both subjects:
n(S ?H)= n(S)+ n(H) - n(S ?H)
⇒ n(S U H)= 30 + 45- 20
⇒ n(S U H)= 55
∴ % of students who not failed in both subjects = 100 -(% of students who passed in any one subject)
⇒% of students who passed in both of the subjects = 100 - 55 = 45.

24 .
If 13 + 23 + 33 +.... + 103 = 4050, then find the value of 23 + 43 + 63 + .... + 203.
A)
13100
B)
32400
C)
54100
D)
80075

Correct Answer :   32400


Explanation : Given, 13 + 23 + 33 +.... + 103 = 4050
23 + 43 + 63 + .... + 203
= 23 (13 + 23 + 33 +.... + 103)
= 8 x 4050
= 32400.

25 .
In 400m race A gives B a start of 7 sec and beats him by 24 sec. In another race, A beats B by 10 sec the speeds are in the ratio
A)
6:8
B)
7:6
C)
8:7
D)
10:8

Correct Answer :   10:8


Explanation : A's Speed: 400/a, a=time taken for A to complete 400m
B's Speed: 400/ (a+10) = 376/ (a+7)
a=40
A's Speed = 400/40 = 10
B's Speed = 400/50 = 8.

26 .
Spotting errors in English:
A)
to me
B)
No Error
C)
on Sundays
D)
The manor is often coming

Correct Answer :   The manor is often coming


Explanation : Manor often comes to me on Sundays.

27 .
If VZSCQ can write as 'XBUFS,' then what can write as 'GJSF'?
A)
ERIF
B)
REFI
C)
ILUH
D)
FIRE

Correct Answer :   ILUH


Explanation : Move two letter backward (-2).

28 .
IF 'DBSJOH' can code as 'FEWHLD' and TIBSFT is coded as 'VLFQWP' how will DBTLFU be coded as in the same code?
A)
FEXJCQ
B)
FEXIBQ
C)
EDXIBP
D)
EDWPAI

Correct Answer :   FEXJCQ


Explanation : Move +2,+3,+4 forward for first three letters Move -2,-3,-4 backward for the last three letters.

29 .
When Atul saw Ramesh, he recalled, "He is the son of the father of my daughter." Who is Ramesh?
A)
Cousin
B)
Brother-in-law
C)
Uncle
D)
Brother

Correct Answer :   Brother-in-law


Explanation : Atul's daughter's mother - Atul's wife;
Atul's wife's father - Atul's father-in-law;
Father-in-law's son - Atul's brother-in-law.
So, Ramesh is Atul's brother-in-law.