Round 1
Aptitude Questions:
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"
C Output Questions
Below answers are validated automatically. Provide exact answer(including if any space, comma etc) for each question.
Note : Provide the answer as "Compiler Error", if there are any compilation error in the given 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;
}#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);
}#include<stdio.h>
void dynamic(int s, ...)
{
printf("%d ", s);
}
int main()
{
dynamic(2, 4, 6, 8);
dynamic(3, 6, 9);
return 0;
}#include <stdio.h>
int main()
{
void demo();
void (*fun)();
fun = demo;
(*fun)();
fun();
return 0;
}
void demo()
{
printf("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;
}#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;
}#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;
}#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;
}union test
{
int x;
char arr[8];
int y;
};
int main()
{
printf("%d", sizeof(union test));
return 0;
}#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;
}After four days, got a call for Round 2,
Round - 2 (2 hour):
Round -3 (2 hours)
Thank You.