Dsa Spot
Youtube Channel : https://www.youtube.com/@dsaspot
Telegram Channel : https://t.me/zohoexamdiscussiongroup
Telegram Group : https://t.me/zohointerviewpreparation
Level 1 :
Aptitide
1) Three pipes A, B and C can fill a tank from empty to full in 30 minutes, 20 minutes, and 10
minutes respectively. When the tank is empty, all the three pipes are opened. A, B and C discharge
chemical solutions P,Q and R respectively. What is the proportion of the solution R in the liquid in
the tank after 3 minutes?
2) Introducing a boy, a girl said, "He is the son of the daughter of the father of my uncle." How is
the boy related to the girl?
3) The average weight of 8 person's increases by 2.5 kg when a new person comes in place of one
of them weighing 65 kg. What might be the weight of the new person?
4) 8, 24, 12, 36, 18, 54, (….) Find the missing Number
5) A milk vendor has 2 cans of milk. The rst contains 25% water and the rest milk. The second
contains 50% water. How much milk should he mix from each of the containers so as to get 12
litres of milk such that the ratio of water to milk is 3 : 5?
6) The product of the ages of A and B is 240. If twice the age of B is more than A’s age by 4 years,
what was B’s age 2 years ago?
7) A man walks 5 km toward south and then turns to the right. After walking 3 km he turns to the left
and walks 5 km. Now in which direction is he from the starting place?
8) A alone can do a piece of work in 6 days and B alone in 8 days. A and B undertook to do it for
Rs. 3200. With the help of C, they completed the work in 3 days. How much is to be paid to C?
9) A train overtakes two persons walking along a railway track. The rst one walks at 4.5 km/hr.
The other one walks at 5.4 km/hr. The train needs 8.4 and 8.5 seconds respectively to overtake
them. What is the speed of the train if both the persons are walking in the same direction as the
train?
10 ) A man rows to a place 48 km distant and come back in 14 hours. He nds that he can row 4
km with the stream in the same time as 3 km against the stream. The rate of the stream is
Programming :
1) #include<stdio.h>
int main()
{
int i;
char c;
for(i=1; i<=5; i++)
{
fi
fi
fi
Dsa Spot
scanf("%c", &c); /* given input is 'b' */
ungetc(c, stdout);
printf("%c", c);
ungetc(c, stdin);
}
return 0;
}
2. )
#include<stdio.h>
int main()
{
static int a[2][2] = {1, 2, 3, 4};
int i, j;
static int *p[] = {(int*)a, (int*)a+1, (int*)a+2};
for(i=0; i<2; i++)
{
for(j=0; j<2; j++)
{
printf("%d, %d, %d, %d\n", *(*(p+i)+j), *(*(j+p)+i),
*(*(i+p)+j), *(*(p+j)+i)); }
}
return 0;
}
3)
#include<stdio.h>
void fun(int **p);
int main()
{
int a[3][4] = {1, 2, 3, 4, 4, 3, 2, 8, 7, 8, 9, 0};
int *ptr;
ptr = &a[0][0];
fun(&ptr);
return 0;
}
void fun(int **p)
{
printf("%d\n", **p);
}
4) int main()
{
printf("%x\n", -1<<3);
return 0;
}
Dsa Spot
5) int main()
{
int X=40;
{
int X=20;
printf("%d ", X);
}
printf("%d\n", X);
return 0;
}
6)
int main()
{
char str1[] = "Hello";
char str2[] = "Hello";
if(str1 == str2)
printf("Unequal\n");
else
printf("Equal\n");
return 0;}
7)
main() {
int a = 9;
switch(a)
{
default:
a = 7;
case 8:
a--;
case 5:
a = ++a + a - - +1;
case 1:
a = a-1;
}
print(a);
}
8)
void main()
{
int array[3][4] = {1, 2, 3, 4, 5};
int I = 0, j = 0;
for (I = 0; I < 2; i++)
for (j= 0; j< 2; j++)
printf("%d ", array[j][i]);
}
Dsa Spot
9)int main()
{
int no=5;
reverse(no);
return 0;
}
int reverse(int no)
{
if(no == 0)
return 0;
else
printf("%d,", no);
reverse (no--);}
10) void fun(int*, int*);
int main()
{
int i=5, j=2;
fun(&i, &j);
printf("%d, %d", i, j);
return 0;
}
void fun(int *i, int *j)
{
*i = *i**i;
*j = *j**j;
}
For Solutions Join Here :
Youtube Channel : https://www.youtube.com/@dsaspot
Telegram Channel : https://t.me/zohoexamdiscussiongroup
Telegram Group : https://t.me/zohointerviewpreparation