easy
0 views

Cognizant Interview Preparation

Comprehensive guide to Cognizant interview preparation including technical and HR interview questions

Understand the Problem

Problem Statement

The Cognizant is an American multinational IT company with its headquarter in the USA. In this article, we are provided various types of interview questions that are helpful in the interview process. So the applied candidates should read the entire content in this article without leaving a single word.

Constraints

  • Content must be suitable for technical and HR interview preparation
  • Questions should cover multiple domains (Control Systems, Electronics, Programming, etc.)
  • Answers should be concise and technically accurate
  • Code examples should be well-formatted and executable

Examples

Example 1
Input
Output

Control System Interview Questions

  • What are the cooling methods to cool a transformer?
  • How do we specify the rating of a transformer?
Explanation

These questions test fundamental knowledge of electrical engineering concepts and transformer operation principles.

Example 2
Input
Output

Mobile Computing Interview Questions

  • Write a function that returns the factorial of a number.
  • What are the data structures?
Explanation

These questions assess programming skills and understanding of basic computer science concepts.

Example 3
Input
Output

HR Interview Questions

  • Tell me something about yourself?
  • Why do you want to work for us?
Explanation

These questions evaluate communication skills, motivation, and cultural fit for the organization.

Solution

// Sample C program for factorial calculation
#include <stdio.h>

int factorial(int n) {
    if (n <= 1) return 1;
    return n * factorial(n - 1);
}

int main() {
    int num;
    printf("Enter a number: ");
    scanf("%d", &num);
    printf("Factorial of %d is %d\n", num, factorial(num));
    return 0;
}
Time:O(n)
Space:O(n)
Approach:

This C program demonstrates a recursive factorial function:

  • Function factorial() handles base case (n <= 1)
  • Recursive call multiplies n by factorial(n-1)
  • Main function reads input and displays result

Visual Explanation

Loading diagram...