0% found this document useful (0 votes)
116 views20 pages

Cognizant GenC Coding Questions

Cognizant GenC has updated its exam pattern for 2025, introducing three rounds: Communication Assessment, Aptitude + Technical Assessment, and Technical Interview. The document includes sample coding questions with solutions across various topics, including fuel consumption calculation, bill generation, character display, and placement recognition. Each question is accompanied by sample inputs and outputs, along with programming examples in C, Java, and Python.

Uploaded by

Ramya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
116 views20 pages

Cognizant GenC Coding Questions

Cognizant GenC has updated its exam pattern for 2025, introducing three rounds: Communication Assessment, Aptitude + Technical Assessment, and Technical Interview. The document includes sample coding questions with solutions across various topics, including fuel consumption calculation, bill generation, character display, and placement recognition. Each question is accompanied by sample inputs and outputs, along with programming examples in C, Java, and Python.

Uploaded by

Ramya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Cognizant GenC Coding Questions 2025

Cognizant GenC has changed the exam pattern for the year 2025. They have divided the
Online test into 3 rounds. Cognizant GenC Coding Questions 2025 page will help you to find
out sample coding questions for practicing for Cognizant GenC Technical Assessment and
Technical Interview.

1. Round – 1 (Communication Assessment)


2. Round – 2(Aptitude + Technical Assessment)
3. Round – 3 (Technical Interview)
Cognizant GenC Coding Questions with Solutions 2025
Topics Details(it may vary)

No. of Questions 4 Questions


 2(easy)
 2(hard)

Time Limit 30 mins + 50 mins

Difficulty Level High

Package Offered 4 LPA


Question 1
Problem Statement – Write a program to calculate the fuel consumption of your
truck.The program should ask the user to enter the quantity of diesel to fill up the tank
and the distance covered till the tank goes dry.Calculate the fuel consumption and display
it in the format (liters per 100 kilometers).
Convert the same result to the U.S. style of miles per gallon and display the result. If the
quantity or distance is zero or negative display ” is an Invalid Input”.
[Note: The US approach of fuel consumption calculation (distance / fuel) is the inverse of
the European approach (fuel / distance ). Also note that 1 kilometer is 0.6214 miles, and 1
liter is 0.2642 gallons.]
The result should be with two decimal place.To get two decimal place refer the below-
mentioned print statement :
float cost=670.23;
System.out.printf(“You need a sum of Rs.%.2f to cover the trip”,cost);
Sample Input 1:
 Enter the no of liters to fill the tank
20
 Enter the distance covered
150
Sample Output 1:
 Liters/100KM
13.33
 Miles/gallons
17.64
Explanation:
 For 150 KM fuel consumption is 20 liters,
 Then for 100 KM fuel consumption would be (20/150)*100=13.33,
 Distance is given in KM, we have to convert it to miles (150*0.6214)=93.21,
 Fuel consumption is given in liters, we have to convert it to gallons
(20*0.2642)=5.284,
 Then find (miles/gallons)=(93.21/5.284)=17.64
Sample Input 2:
 Enter the no of liters to fill the tank
-5
Sample Output 2:
 -5 is an Invalid Input
Sample Input 3:
 Enter the no of liters to fill the tank
25
 Enter the distance covered
-21
Sample Output 3:
 -21 is an Invalid Input
C
Java
Python
Run
#include<stdio.h>
#include<stdlib.h>
int main () {
printf ("Enter the no of liters to fill the tank\n");
int ltt;
scanf ("%d", <t);

double lt = (ltt * 1.00);


if (ltt < 1){

printf ("%d is an Invalid Input\n", ltt);


exit (0);
}

printf ("Enter the distance covered\n");


int diss;
scanf ("%d", &diss);
double dis = (diss * 1.00);
if (diss < 1){
printf (" %d is an Invalid Input\n", diss);
exit (0);
}
double hundred = ((lt / dis) * 100);
printf ("Liters/100KM\n");
printf ("%.2f\n", hundred);
double miles = (dis * 0.6214);
double gallons = (lt * 0.2642);
double mg = miles / gallons;
printf ("Miles/gallons\n");
printf ("%.2f\n", mg);
return 0;
}
Question-2
Problem Statement – Vohra went to a movie with his friends in a Wave theatre and
during break time he bought pizzas, puffs and cool drinks. Consider the following
prices :
 Rs.100/pizza
 Rs.20/puffs
 Rs.10/cooldrink
Generate a bill for What Vohra has bought.
Sample Input 1:
 Enter the no of pizzas bought:10
 Enter the no of puffs bought:12
 Enter the no of cool drinks bought:5
Sample Output 1:
Bill Details
 No of pizzas:10
 No of puffs:12
 No of cooldrinks:5
 Total price=1290
ENJOY THE SHOW!!!
C
Java
Python
Run
#include<stdio.h>
#include<stdlib.h>
int main () {
int totalprice;
printf ("Enter the no of pizzas bought:\n");
int pizza;
scanf ("%d", &pizza);
printf ("Enter the no of puffs bought:\n");
int puffs;
scanf ("%d", &puffs);
printf ("Enter the no of cool drinks bought:\n");
int coolDrinks;
scanf ("%d", &coolDrinks);
int pizzaa = pizza * 100;
int puffss = (puffs) * 20;
int coolDrinkss = (coolDrinks) * 10;
printf ("Bill Details\n");
printf ("No of pizzas: %d\n", pizza);
printf ("No of puffs: %d\n", puffs);
printf ("No of cooldrinks: %d\n", coolDrinks);
totalprice = pizzaa + puffss + coolDrinkss;
printf ("Total price= %d\n", totalprice);
printf ("ENJOY THE SHOW!!!");
return 0;
}
Question-3
Problem Statement – Ritik wants a magic board, which displays a character for a
corresponding number for his science project. Help him to develop such an application.
For example when the digits 65,66,67,68 are entered, the alphabet ABCD are to be
displayed.
[Assume the number of inputs should be always 4 ]
Sample Input 1:
 Enter the digits:
65
66
67
68
Sample Output 1:
65-A
66-B
67-C
68-D
Sample Input 2:
 Enter the digits:
115
116
101
112
Sample Output 2:
115-s
116-t
101-e
112-p
C
Java
Python
Run
#include<stdio.h>
#include<stdlib.h>
int main(){
printf("Enter the digits: \n");

int a,b,c,d;
scanf("%d%d%d%d",&a,&b,&c,&d);

char q=(char)a;
char w=(char)b;
char e=(char)c;
char r=(char)d;

printf("%d - %c\n",a,q);
printf("%d - %c\n",b,w);
printf("%d - %c\n",c,e);
printf("%d - %c\n",d,r);
return 0;
}
Question-4
Problem Statement – FOE college wants to recognize the department which has
succeeded in getting the maximum number of placements for this academic year. The
departments that have participated in the recruitment drive are CSE,ECE, MECH. Help
the college find the department getting maximum placements. Check for all the possible
output given in the sample snapshot
Note : If any input is negative, the output should be “Input is Invalid”. If all department
has equal number of placements, the output should be “None of the department has got
the highest placement”.
Sample Input 1:
 Enter the no of students placed in CSE:90
 Enter the no of students placed in ECE:45
 Enter the no of students placed in MECH:70
Sample Output 1:
 Highest placement
CSE
Sample Input 2:
 Enter the no of students placed in CSE:55
 Enter the no of students placed in ECE:85
 Enter the no of students placed in MECH:85
Sample Output 2:
 Highest placement
ECE
MECH
Sample Input 3:
 Enter the no of students placed in CSE:0
 Enter the no of students placed in ECE:0
 Enter the no of students placed in MECH:0
Sample Output 3:
 None of the department has got the highest placement
Sample Input 4:
 Enter the no of students placed in CSE:10
 Enter the no of students placed in ECE:-50
 Enter the no of students placed in MECH:40
Sample Output 4:
 Input is Invalid
C
Java
Python
Run
#include<stdio.h>
#include<stdlib.h>
int main () {
int cse;
int ece;
int mech;
// Take user input
printf ("Enter the no. of students placed in CSE: ");
scanf ("%d", &cse);
printf ("Enter the no. of students placed in ECE: ");
scanf ("%d", &ece);
printf ("Enter the no. of students placed in MECH: ");
scanf ("%d", &mech);

// If any integer is negative, print message and exit


if (cse < 0 || ece < 0 || mech < 0){
printf ("Input is Invalid\n");
// If all values are equal, print message and exit else { if (cse ==
ece && ece == mech && mech==cse) { printf("None of the department has got the
highest placement\n"); } //System.out.println("Highest Placement:"); // First, check if any
two values are equal and greater than the third else if (cse == ece && cse > mech)

printf ("Highest Placement:\n");


printf ("CSE\n");
printf ("ECE\n");
}
else if (cse == mech && cse > ece){
printf ("Highest Placement:\n");
printf ("CSE\n");
printf ("MECH\n");
}
else if (ece == mech && ece > cse){
printf ("Highest Placement:\n");
printf ("ECE\n");
printf ("MECH\n");

}
else if (cse > ece && cse > mech){
printf ("Highest Placement:\n");
printf ("CSE\n");
}
else if (ece > mech){
printf ("Highest Placement:\n");
printf ("ECE\n");
}
else{
printf ("Highest Placement:\n");
printf ("MECH\n");
}

return 0;

}
Cognizant GenC Coding Questions and Answers 2025
Question-5
Problem Statement – In a theater, there is a discount scheme announced where one gets
a 10% discount on the total cost of tickets when there is a bulk booking of more than 20
tickets, and a discount of 2% on the total cost of tickets if a special coupon card is
submitted. Develop a program to find the total cost as per the scheme. The cost of the k
class ticket is Rs.75 and q class is Rs.150. Refreshments can also be opted by paying an
additional of Rs. 50 per member.
Hint: k and q and You have to book minimum of 5 tickets and maximum of 40 at a
time. If fails display “Minimum of 5 and Maximum of 40 Tickets”. If circle is given
a value other than ‘k’ or ‘q’ the output should be “Invalid Input”.
The ticket cost should be printed exactly to two decimal places.
Sample Input 1:
 Enter the no of ticket:35
 Do you want refreshment:y
 Do you have coupon code:y
 Enter the circle:k
Sample Output 1:
 Ticket cost:4065.25
Sample Input 2:
 Enter the no of ticket:1
Sample Output 2:
 Minimum of 5 and Maximum of 40 Tickets
C
Java
Python
Run
#include<stdio.h>
#include<stdlib.h>
int main () {

int noTicket;
double total = 0, cost;
char ref[2], co[2], circle[2];
printf ("Enter the no of ticket:");
scanf ("%d", &noTicket);
if (noTicket < 5 || noTicket > 40){
printf ("Minimum of 5 and Maximum of 40 tickets");
exit (0);
}
printf ("Do you want refreshment:");
scanf ("%s", &ref);
printf ("Do you have coupon code:");
scanf ("%s", &co);
printf ("Enter the circle:");
scanf ("%s", &circle);
if (circle[0] == 'k') cost = 75 * noTicket;
else if (circle[0] == 'q') cost = 150 * noTicket;
else {
printf ("Invalid Input");
exit (0);
}
total = cost;
if (noTicket > 20)
cost = cost - ((0.1) * cost);
total = cost;
if (co[0] == 'y')
total = cost - ((0.02) * cost);
if (ref[0] == 'y')
total += (noTicket * 50);
printf ("Ticket cost:%.2f", total);

return 0;

}
Question-6
Problem Statement – Rhea Pandey’s teacher has asked her to prepare well for the lesson
on seasons. When her teacher tells a month, she needs to say the season corresponding to
that month. Write a program to solve the above task.
 Spring – March to May,
 Summer – June to August,
 Autumn – September to November and,
 Winter – December to February.
Month should be in the range 1 to 12. If not the output should be “Invalid month”.
Sample Input 1:
 Enter the month:11
Sample Output 1:
 Season:Autumn
Sample Input 2:
 Enter the month:13
Sample Output 2:
 Invalid month
C
Java
Python
Run
#include<stdio.h>
#include<stdlib.h>
int main(){
printf("Enter the month:");
int entry ;
scanf("%d",&entry);
switch (entry) {
case 12:
case 1:
case 2:
printf("Season:Winter");
break;
case 3:
case 4:
case 5:
printf("Season:Spring");
break;
case 6:
case 7:
case 8:
printf("Season:Summer");
break;
case 9:
case 10:
case 11:
printf("Season:Autumn");
break;
default:
printf("Invalid month");
}
return 0;
}
Question-7
Problem Statement – To speed up his composition of generating unpredictable rhythms,
Blue Bandit wants the list of prime numbers available in a range of numbers.Can you help
him out?
Write a java program to print all prime numbers in the interval [a,b] (a and b, both
inclusive).
Note
 Input 1 should be lesser than Input 2. Both the inputs should be positive.
 Range must always be greater than zero.
 If any of the condition mentioned above fails, then display “Provide valid input”
 Use a minimum of one for loop and one while loop
Sample Input 1:
2
15
Sample Output 1:
2 3 5 7 11 13
Sample Input 2:
8
5
Sample Output 2:
 Provide valid input
C
Java
Python
Run
#include<stdio.h>
#include<stdlib.h>
int main () {
int a, b;
scanf ("%d%d", &a, &b);
int flag;
if (a <= 0 || b <= 0 || a >= b) printf ("Provide valid input");
else{
while (a <= b){

if (a == 2)
printf ("%d ", a);
else if (a == 1){
a++;
continue;
}
else{
flag = 0;
for (int i = 2; i <= a / 2; i++){
if (a % i == 0){
flag = 1;
break;
}

if (flag == 0) printf ("%d ", a);

}
a++;
}
}
return 0;
}
Question-8
Problem Statement – Goutam and Tanul plays by telling numbers. Goutam says a
number to Tanul. Tanul should first reverse the number and check if it is same as the
original. If yes, Tanul should say “Palindrome”. If not, he should say “Not a
Palindrome”. If the number is negative, print “Invalid Input”. Help Tanul by writing a
program.
Sample Input 1 :
21212
Sample Output 1 :
Palindrome
Sample Input 2 :
6186
Sample Output 2 :
Not a Palindrome
C
Java
Python
Run
#include<stdio.h>
#include<stdlib.h>
int main(){
int n ;
scanf("%d",&n);
int sum = 0, r;
int temp = n;
if(n>-1) {
while(n>0){
r = n % 10;
sum = (sum*10)+r;
n = n/10;
}
if(temp==sum)
printf("Palindrome");
else
printf("Not a Palindrome");
}
else{
printf("Invalid Input");
}

return 0;
}
Cognizant GenC Coding Questions
Question-9
XYZ Technologies is in the process of increment the salary of the employees. This
increment is done based on their salary and their performance appraisal rating.
1. If the appraisal rating is between 1 and 3, the increment is 10% of the salary.
2. If the appraisal rating is between 3.1 and 4, the increment is 25% of the salary.
3. If the appraisal rating is between 4.1 and 5, the increment is 30% of the salary.
Help them to do this, by writing a program that displays the incremented salary. Write a
class “IncrementCalculation.java” and write the main method in it.
Note : If either the salary is 0 or negative (or) if the appraisal rating is not in the range
1 to 5 (inclusive), then the output should be “Invalid Input”.
Sample Input 1 :
 Enter the salary
8000
 Enter the Performance appraisal rating
3
Sample Output 1 :
8800
Sample Input 2 :
 Enter the salary
7500
 Enter the Performance appraisal rating
4.3
Sample Output 2 :
9750
Sample Input 3 :
 Enter the salary
-5000
 Enter the Performance appraisal rating
6
Sample Output 3 :
 Invalid Input
Java
C
Run
import java.util.*;
class Main{
public static void main (String[] args) {

Scanner sc = new Scanner (System.in);

System.out.println("Enter the salary");

int salary = sc.nextInt();

System.out.println("Enter the Performance appraisal rating");

float rating = sc.nextFloat();

if(salary<1||rating<1.0||rating>5.0){

System.out.println("Invalid Input");

System.exit(0);

else if(rating>=1&&rating<=3){ salary=salary+(int)(0.1*salary);


System.out.println(salary); } else if(rating>3&&rating<=4){ salary=salary+(int)
(0.25*salary); System.out.println(salary); } else /*if(rating>4&&rating<=5)*/{

salary=salary+(int)(0.3*salary);

System.out.println(salary);

Question-10
Problem Statement – Chaman planned to choose a four digit lucky number for his car.
His lucky numbers are 3,5 and 7. Help him find the number, whose sum is divisible by 3
or 5 or 7. Provide a valid car number, Fails to provide a valid input then display that
number is not a valid car number.
Note : The input other than 4 digit positive number[includes negative and 0] is considered
as invalid.
Refer the samples, to read and display the data.
Sample Input 1:
 Enter the car no:1234
Sample Output 1:
 Lucky Number
Sample Input 2:
 Enter the car no:1214
Sample Output 2:
 Sorry its not my lucky number
Sample Input 3:
 Enter the car no:14
Sample Output 3:
 14 is not a valid car number
Java
C++
Run
import java.util.*;
class Main {
public static void main (String[]args)
{
int sum = 0;
Scanner sc = new Scanner (System.in);
System.out.print ("Enter the car no:");
int carNum = sc.nextInt ();
if (carNum < 1000 || carNum > 9999)
{
System.out.println (carNum + " is not a valid car number");
}
else
{
while (carNum != 0)
{
int l = carNum % 10;
sum = sum + l;
carNum = carNum / 10;
}

if (sum % 3 == 0 || sum % 5 == 0 || sum % 7 == 0)


{
System.out.println ("Lucky Number");
}
else
{
System.out.println ("Sorry its not my lucky number");
}
}
}

}
Question-11
Problem Statement –
IIHM institution is offering a variety of courses to students. Students have a facility to
check whether a particular course is available in the institution. Write a program to help
the institution accomplish this task. If the number is less than or equal to zero display
“Invalid Range”.
Assume maximum number of courses is 20.
Sample Input 1:
 Enter no of course:
5
 Enter course names:
Java
Oracle
C++
Mysql
Dotnet
 Enter the course to be searched:
C++
Sample Output 1:
C++ course is available
Sample Input 2:
 Enter no of course:
3
 Enter course names:
Java
Oracle
Dotnet
 Enter the course to be searched:
C++
Sample Output 2:
C++ course is not available
Sample Input 3:
 Enter no of course:
0
Sample Output 3:
Invalid Range
Java
Python
C++
Run
import java.util.*;
class Main
{
public static void main(String[] args)
{
int n=0,flag=0;
String courseSearch;
Scanner sc = new Scanner (System.in);
System.out.println("Enter no of course:");
n= sc.nextInt();

if(n<=0||n>20){
System.out.println("Invalid Range");
System.exit(0);
}
System.out.println("Enter course names:");
String[] course = new String[n];
sc.nextLine();
for (int i = 0; i < course.length; i++) {
course[i] = sc.nextLine();
}
System.out.println("Enter the course to be searched:");
courseSearch=sc.nextLine();
for (int i = 0; i < course.length; i++) {
if(course[i].equals(courseSearch))
{
flag=1;
}
}

if(flag==1){
System.out.println(courseSearch+" course is available");
}
else {
System.out.println(courseSearch+" course is not available");

}
Question-12
Problem Statement – Mayuri buys “N” no of products from a shop. The shop offers a
different percentage of discount on each item. She wants to know the item that has the
minimum discount offer, so that she can avoid buying that and save money.
[Input Format: The first input refers to the no of items; the second input is the item
name, price and discount percentage separated by comma(,)]
Assume the minimum discount offer is in the form of Integer.
Note: There can be more than one product with a minimum discount.
Sample Input 1:
4
mobile,10000,20
shoe,5000,10
watch,6000,15
laptop,35000,5
Sample Output 1:
shoe
Explanation: The discount on the mobile is 2000, the discount on the shoe is 500, the
discount on the watch is 900 and the discount on the laptop is 1750. So the discount on
the shoe is the minimum.
Sample Input 2:
4
Mobile,5000,10
shoe,5000,10
WATCH,5000,10
Laptop,5000,10
Sample Output 2:
Mobile
shoe
WATCH
Laptop
Java
Python
C++
Run
import java.util.*;
import java.io.*;
public class Main{
public static void main (String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
Scanner sc=new Scanner(System.in);
int num = Integer.parseInt(br.readLine());
int itemPrice[] = new int[num];
int itemDis[] = new int[num];

String itemName[] = new String[num];


//String[] values;
float dis[] = new float[num];
String[] input = new String[num];
for(int i=0;i< num;i++)
{
String s[]= br.readLine().split(",");
itemName[i] =s[0];
//System.out.println(itemName[i]);
itemPrice[i]=Integer.parseInt(s[1]);
// System.out.println(itemPrice[i]);
itemDis[i]=Integer.parseInt(s[2]);
// System.out.println(itemDis[i]);
//float x = itemDis[i]
dis[i]=(float)((itemDis[i]*itemPrice[i])/100);
// System.out.println(dis[i]);
}

int idx[]=new int[num];


int j=0;
float min= Float.MAX_VALUE;
for(int i=0;i< num;i++){
if(dis[i]<=min)
{
min=dis[i];
idx[j++]=i;
//System.out.println(min);
}
}
for(int i=0;i< j;i++){
System.out.println(itemName[idx[i]]);
//System.out.println(idx[i]);
}
}

}
Question-13
Problem Statement – Raj wants to know the maximum marks scored by him in each
semester. The mark should be between 0 to 100 ,if goes beyond the range display “You
have entered invalid mark.”
Sample Input 1:
 Enter no of semester:
3
 Enter no of subjects in 1 semester:
3
 Enter no of subjects in 2 semester:
4
 Enter no of subjects in 3 semester:
2
 Marks obtained in semester 1:
50
60
70
 Marks obtained in semester 2:
90
98
76
67
 Marks obtained in semester 3:
89
76

Sample Output 1:
 Maximum mark in 1 semester:70
 Maximum mark in 2 semester:98
 Maximum mark in 3 semester:89
Sample Input 2:
 Enter no of semester:
3
 Enter no of subjects in 1 semester:
3
 Enter no of subjects in 2 semester:
4
 Enter no of subjects in 3 semester:
2
 Marks obtained in semester 1:
55
67
98
 Marks obtained in semester 2:
67
-98
Sample Output 2:
You have entered invalid mark.
Java
Python
C++
Run
import java.util.*;
import java.lang.*;
import java.io.*;
class Main{
public static void main (String[] args) throws java.lang.Exception{
Scanner sc = new Scanner (System.in);
System.out.println("Enter no of semester:");
int sems = sc.nextInt();
boolean incorrect = false;
int arr[] = new int [sems];

for(int i=0;i< sems;i++) {


System.out.println("Enter no of subjects in "+(i+1)+" semester:");
arr[i]=sc.nextInt();
}
int maxMarks[] = new int[sems];
for(int i=0;i< sems;i++) {
System.out.println("Marks obtained in semester "+(i+1)+":");
int max = sc.nextInt();
if(max<0||max>100) {
System.out.println("You have entered invalid mark.");
System.exit(0);
}
for(int j=1;j< arr[i];j++) {
int marks=sc.nextInt();
if(marks<0||marks>100)
{
System.out.println("You have entered invalid mark.");
System.exit(0);
}

if(max< marks)
max=marks;

}
maxMarks[i]= max;
}
for(int i=0;i< sems;i++) {
System.out.println("Maximum mark in "+(i+1)+" semester:"+maxMarks[i]);
}

}
Question-14
Problem Statement – Bela teaches her daughter to find the factors of a given number.
When she provides a number to her daughter, she should tell the factors of that number.
Help her to do this, by writing a program. Write a class FindFactor.java and write the
main method in it.
Note :
 If the input provided is negative, ignore the sign and provide the output. If the input is
zero
 If the input is zero the output should be “No Factors”.

Sample Input 1 :
54
Sample Output 1 :
1, 2, 3, 6, 9, 18, 27, 54
Sample Input 2 :
-1869
Sample Output 2 :
1, 3, 7, 21, 89, 267, 623, 1869
Java
Python
C++
Run
import java.util.*;
public class Main{
public static void main(String[] args){
int i;
Scanner sc = new Scanner (System.in);
int num = sc.nextInt();
if(num==0){
System.out.println("No Factors");
}
else if(num>0){
for(i=1;i< num;i++){
if(num%i==0){
System.out.print(i+", ");
}
}
System.out.println(num);
}
else{
num=num*-1;
for(i=1;i< num;i++){
if(num%i==0){
System.out.print(i+", ");
}
}
System.out.println(num);
}

}
}

Cognizant GenC Advanced Coding Questions and Solutions

Here you will find all Practise Cognizant GenC coding questions and CTS programming questions.

Cognizant GenC Coding Round has changed a little bit this year. This year there will be 2 Coding
rounds - one is the basic coding round and another is an advanced coding round.

Cognizant Programming Questions and Coding Paper 2025

 Pattern Programming Dashboard

 Pattern Making Questions (Trapezium)

 Pattern Making Question (Pyramid)

 Pattern Making Questions (Matrix)

 GCD of Two Numbers

 Input-Output Questions

 LCM of three numbers

You might also like