Zoho SDE Intern - (June 2021)
Summary
I interviewed for the SDE Intern role at Zoho in June 2021. The interview process consisted of three rounds: an initial assessment with aptitude and C output questions, a comprehensive coding round including a hard LeetCode problem, and a final round focused on an OOPs-based problem.
Full Experience
Round 1
This round had 10 aptitude questions and 10 questions related to C outputs. A proctor was present on a video call to ensure no cheating.
Aptitude Questions:
I was presented with 10 quantitative aptitude problems covering various topics such as elections, probability, time and distance, ages, mixtures, partnerships, work and time, mensuration, boats and streams, and profit and loss.
C Output Questions:
I then had to predict the exact output for 10 C/C++ code snippets, or identify if there was a compilation error as specified.
Round 2 (2 hours)
After four days, I received a call for the second round. This was a complete coding round, featuring algorithmic questions. There were 5 questions, ranging from easy to medium to hard. I distinctly remember the fifth question was taken directly from LeetCode, specifically the "Max Points on a Line" problem.
Round 3 (2 hours)
On the same day as Round 2, I was called for Round 3. This round involved a single, long OOPs-based problem that I had to solve.
Interview Questions (21)
In an election between two candidates, one got 55% of total valid votes and 20% of the total votes casted were invalid. If total votes were 7500, then what is the number of valid votes that the other person got?
Answer format : "x"
A bag contains 3 white, 4 red and 5 blue balls. Three balls are drawn at random from the bag. The probability that all of them are blue, is
Answer format : "x/y"
Two stations A and B are 150 km apart from each other. One train starts from A at 6 AM at speed of 30 km/hr and travels towards B. Another train starts from station B at 7 AM at speed 20 km/hr towards A. At what time they will meet?
Answer format : "hh:mm am/pm"
Ramesh was 5 times older than Sourav 10 years ago. 5 years from now, Ramesh will be twice older than Sourav. What was the ratio of the age of Ramesh and Sourav 5 years ago?
Answer format : "x:y"
A vessel contains 120 liters mixture of milk and water and water is 25% of milk in the vessel. If 12 liters of water added in the vessel, then find the ratio of water to milk in the resulting mixture?
Answer format : "x:y"
Kapil and Pooja started a business. Kapil invested Rs. 80,000 and after 8 month he invests Rs. 40,000 more. Pooja invested Rs. 1,00,000 and withdraws Rs. 20,000 after 4 months. Pooja is an active partner, so she receives Rs. 2700 per month as salary. If profit share of Kapil after 1 year is Rs. 1,40,000. Then find profit share of Pooja (excluding salary) at the end of the year?
Answer format : "32,50,000"
3 men & 4 women finish 25% of work in 4 days while 8 men & 15 women can finish the whole work in 5 days. In how many days will 13 women finish it?
Answer format : "x"
If ratio of length, breadth and height of a cuboid is 1:2:3 and its area is 88 sq.cm then find the volume of a cube having edge length equal to the breadth of the cuboid.
Answer format : "x"
Speed of a boat is 5 km per hour in still water and the speed of the stream is 3 km per hour. If the boat takes 3 hours to go to a place and come back, the distance of the place is?
Answer format : "x.y"
If an article is sold at a gain of 6% instead of a loss of 6%, the seller gets Rs. 6 more. What is the cost price of the article?
Answer format : "x"
What is the output of this program?
#include <iostream>
using namespace std;
int main()
{
int i, j, var = 'A';
for (i = 5; i >= 1; i--) {
for (j = 0; j < i; j++)
printf("%c ", (var + j));
printf("\n");
}
return 0;
}
Output of the program
#include <stdio.h>
void f(char**);
int main()
{
char *argv[] = { "ab", "cd", "ef", "gh", "ij", "kl" };
f(argv);
return 0;
}
void f(char **p)
{
char *t;
t = (p += sizeof(int))[-1];
printf("%sn", t);
}
Output of following program?
#include<stdio.h>
void dynamic(int s, ...)
{
printf("%d ", s);
}
int main()
{
dynamic(2, 4, 6, 8);
dynamic(3, 6, 9);
return 0;
}
Predict the output?
#include <stdio.h>
int main()
{
void demo();
void (*fun)();
fun = demo;
(*fun)();
fun();
return 0;
}
void demo()
{
printf("program ");
}
What is the output of following program?
# include <stdio.h>
int main()
{
char str1[] = "ZohoInterview";
char str2[] = {'t', 'e', 's', 't', 't', 'e', 's', 't', '1'};
int n1 = sizeof(str1)/sizeof(str1[0]);
int n2 = sizeof(str2)/sizeof(str2[0]);
printf("n1 = %d, n2 = %d", n1, n2);
return 0;
}
Predict the Output
#include<stdio.h>
int main()
{
char str[] = "Aptitude";
printf("%s %s %sn", &str[5], &5[str], str+5);
printf("%c %c %cn", *(str+6), str[6], 6[str]);
return 0;
}
Predict the output of the below program:
#include <stdio.h>
#define SIZE(arr) sizeof(arr) / sizeof(*arr);
void fun(int* arr, int n)
{
int i;
*arr += *(arr + n - 1) += 10;
}
void printArr(int* arr, int n)
{
int i;
for(i = 0; i < n; ++i)
printf("%d ", arr[i]);
}
int main()
{
int arr[] = {10, 20, 30};
int size = SIZE(arr);
fun(arr, size);
printArr(arr, size);
return 0;
}
Print the output
#include<stdio.h>
struct st
{
int x;
struct st next;
};
int main()
{
struct st temp;
temp.x = 10;
temp.next = temp;
printf("%d", temp.next.x);
return 0;
}
Note: This code defines a struct where one of its members is an instance of the struct itself, leading to an infinitely recursive type definition. This typically results in a compiler error.
Identify the output of the following
union test
{
int x;
char arr[8];
int y;
};
int main()
{
printf("%d", sizeof(union test));
return 0;
}
Output of the program
#include <stdio.h>
char *c[] = {"GeksQuiz", "MCQ", "TEST", "QUIZ"};
char **cp[] = {c+3, c+2, c+1, c};
char ***cpp = cp;
int main()
{
printf("%s ", **++cpp);
printf("%s ", *--*++cpp+3);
printf("%s ", *cpp[-2]+3);
printf("%s ", cpp[-1][-1]+1);
return 0;
}