Professional Documents
Culture Documents
Aptitude (5 minutes)
1. I travel to work by bus and train. If my bus journey takes 28 minutes and my
train journey takes 35 minutes longer, what is the total travelling time in hours
and minutes?
a. 1 hour 3 minutes
b. 1 hour 31 minutes
c. 2 hour 1 minute
d. 2 hour 31 minute
Answer_Correct Option is b(1 hour 31 minutes)
Reason_Given,time taken in bus journey=28 minutes.Since train journey takes 35
munutes longer,then time taken is train journey=(28+35)minutes=63 minutes.
Thus total travelling time=(28+63)minutes=91 minutes=1 hour 31
minutes.
3. Jo’s age plus Mo’s age is 27;and Jo’s age plus Flo’s age is 38;and Mo’s age
plus Flo’s age is 33.Therefore, how old are Jo, Mo and Flo?
a. Jo 16, Mo 11, Flo 22
b. Jo 22, Mo 11, Flo 16
c. Jo 11, Mo 22, Flo 16
d. None of the above
Step 1 of 3 :
= Rs 55,000 × 22/100
= Rs 12,100
Step 2 of 3 :
= Rs 80,000 - Rs 55,000
= Rs 25,000
= Rs 25,000 × 35/100
= Rs 8,750
Step 3 of 3 :
= Rs 12,100 + Rs 8,750
= Rs 20,850
( (
A ( A
+ (+ A
B (+ AB
) AB+
* * AB+
( *( AB+
C *( AB+C
* *(* AB+C
D *(* AB+CD
- *(- AB+CD*
E *(- AB+CD*E
) * AB+CD*E-
* ** AB+CD*E-
F ** AB+CD*E-F
/ **/ AB+CD*E-F
G **/ AB+CD*E-FG
AB+CD*E-FG/**
2. What is the result of the following operation Top (Push (S, X))
a. X
b. Null
c. S
d. None
3. If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted
one at a time, in what order will they be removed?
a. ABCD
b. DCBA
c. DCAB
d. None of the above
Answer: A
Answer: D
#include<stdio.h>
void fun(int);
int main()
{
int a=3;
fun(a);
return 0;
}
void fun(int n)
{
if(n>0)
{
fun(--n);
printf("\n%d",n);
fun(--n);
}
}
Ans : 0 1 2
Answer: 40
Answer:
1
3
5
7
9
Answer:
Code:
#include<stdio.h>
int main()
{
int n1=0,n2=1,n3,i,number;
printf("Enter the number of elements:");
scanf("%d",&number);
printf("\n%d %d",n1,n2);//printing 0 and 1
for(i=2;i<number;++i)//loop starts from 2 because 0 and 1 are already printed
{
n3=n1+n2;
printf(" %d",n3);
n1=n2;
n2=n3;
}
return 0;
}
Output:
Enter the number of elements: 10
0 1 1 2 3 5 8 13 21 34
*
* * *
* * * * *
* * * * * * *
Answer:
Code :
#include <stdio.h>
int main()
{
int i, j, rows, k = 0;
printf (" Enter a number to define the rows: \n");
scanf ("%d", &rows);
for ( i =1; i <= rows; i++)
{
for ( j = 1; j <= rows - i; j++)
{
printf (" ");
}
// use for loop where k is less than equal to (2 * i -1)
for ( k = 1; k <= ( 2 * i - 1); k++)
{
printf ("* "); // print the Star
}
printf ("\n");
}
return 0;
}
Output :