Interviews Questions, Algorithms, Aptitude, C Interview Program, C Theory Question, Aptitude Tricks, Test Series,

Wednesday 31 July 2019

The Interview Question Today#158(31-07-19)


Aptitude Hack#158(31-07-19)


Tuesday 30 July 2019

The Interview Question Today#157(30-07-19)


Monday 29 July 2019

The Interview Question Today#156(29-07-19)


Sunday 28 July 2019

The Interview Question Today#155(28-07-19)


Saturday 27 July 2019

The Interview Question Today#154(27-07-19)


Friday 26 July 2019

The Interview Question Today#153(26-07-19)


Thursday 25 July 2019

Wednesday 24 July 2019

The Interview Question Today#151(24-07-19)


Tuesday 23 July 2019

The Interview Question Today#150(23-07-19)


Monday 22 July 2019

The Interview Question Today#149(22-07-19)


Sunday 21 July 2019

Important Points and Shortcuts for Clock problems



  • Clock formula: 11/12. This is a very important point for solving aptitude questions on clocks.

  • As minute hand covers one full circle i.e. 360 degrees in one hour, that means it travels 360/60 = 6 degrees/min.

  • An hour hand covers one part of the 12 major parts of the circle which means it covers 360/12 = 30 degrees in one hour i.e. it travels 30/60 = 1/2 degree per min.

  • Now, the relative speed of the minute hand is 6 – 1/2 = 11/2 or 5.5 degrees. This 11/2 degrees will be useful in finding the angle between the two hands of the clock.

  • The complete circle has a total of 360 degrees and in terms of minute spaces, it has been divided into 60 minutes spaces, which means each minute space represents 360/60 = 6 degrees.

  • The complete circle has been divided into 12 equal bigger units also, which we call as hours. This further implies that every hour space covers a total of 360/12 = 30 degrees.

  • The hour hand and minute hand meet once every hour. But in a 12 hour period, they meet 11 times.

  • There is one angle of 180 degrees in every hour i.e. both the hands are in the straight line in the opposite direction, but in a twelve-hour period, it happens 11 times.

  • There are 2 right angles every hour, but in a 12 hour period, there are 22 such angles.

  • If the two hands are moving at the normal speeds, they should meet after every 65 5/11 min.

  • Clock Aptitude Tricks -Short Cut - Between x and (x + 1) O’clock, the 2 hands will be ‘t’ min apart at (5x t) 12/11 past x.

Puzzle#4


The Interview Question Today#148(21-07-19)


Saturday 20 July 2019

The Interview Question Today#147(20-07-19)


Friday 19 July 2019

The Interview Question Today#146(19-07-19)


Thursday 18 July 2019

The Interview Question Today#145(18-07-19)


Wednesday 17 July 2019

The Interview Question Today#144(17-07-19)


Tuesday 16 July 2019

The Interview Question Today#143(16-07-19)


Monday 15 July 2019

Aptitude Hack#142(15-07-19)

Question:

In the classroom, there are some benches and some students. if one student sits per bench then 9 more benches are required. If two students sit per bench there are no students on 3 benches. find the number of students in the class.

A) 16
B) 20
C) 22
D) 24


The Interview Question Today#142(15-7-19)


Sunday 14 July 2019

The Interview Question Today #141(14-07-19)


Aptitude hack#141(14-07-19)

Question:

A is as older than B as he is younger than C.If the sum of ages of B and C is 68 years. What is the present age of A?

A) 24 years
B) 34 years
C) 28 years
D) 32 years


Saturday 13 July 2019

Aptitude Hack#140(13-07-19)

Question:

The least perfect square, which is divisible by each of 15, 20 and 36 is:

A) 1200
B) 800
C) 1000
D) 900


The Interview Question Today#140(13-07-19)


Friday 12 July 2019

The Interview Question Today#139(12-07-19)


Aptitude Hack#139(12-07-19)

Question;

Find a positive number which when increased by 16 is equal to 80 times the reciprocal of the number
A)  20
B)  -4
C) -10
D)   4


Thursday 11 July 2019

The Interview Question Today#138(11-07-19)


Aptitude Hack#138(11-7-19)

Question:

512 x 512 + 488 x 488 = ?

A) 512438
B) 502568
C) 500288
D) 514318


Wednesday 10 July 2019

Aptitude Hack#137(10-7-19)

Question:

The difference between a two-digit number and the number obtained by interchanging the positions of its digits is 45. What is the difference between the two digits of that number?

A)  5
B)  7
C)  6
D)  None of these


The Interview Question Today#137(10-07-19)


Tuesday 9 July 2019

The Interview Question Today#136(09-07-19)


Aptitude Hack#136(9-7-19)

Question:

The present ages of A, B and C are in proportions 4:5:9. Nine years ago, the sum of their ages was 45 years. Find their present ages in years

A)15,20,35
B) 20,24,36
C) 20,25,45
D) 16,20,36


Monday 8 July 2019

The Interview Question Today#135(08-07-19)


Aptitude Hack#135(8-7-19)

Question:























Sunday 7 July 2019

The Interview Question Today#134(07-07-19)


Aptitude Hack#134(7-7-19)

Question:

The banker's gain on a sum due 3 years hence at 12% per annum is Rs. 270. The banker's discount is:

A. Rs. 960
B. Rs. 840
C. Rs. 1020
D. Rs. 760


Saturday 6 July 2019

Alphabet Pattern

Question:




























Solution:

//Method 1:

#include<stdio.h>

void main()
{

int no_of_lines, alphabet = 65, i, count, j;

printf("\nenter the number of lines you want to print\t:");
scanf("%d",&no_of_lines);
count=2*no_of_lines;
for(j=0;j<no_of_lines;j++)
{
if(j==0)
{
printf("\n\n");
for(i=0;i<count;i++)
{
if(i<no_of_lines)
{
printf(" %c", alphabet++);
}
else if(i == no_of_lines)
{
alphabet--;
}
else
{
printf(" %c",--alphabet);
}
}
}
else
{
printf("\n");
for(i=0;i<count-2*j;i++)
{
if(i<no_of_lines-j)
{
printf(" %c", alphabet++);
}
else
{
printf(" %c",--alphabet);
}
}

}
}
}



//Method 2: 
//Credit Rakshita

#include<stdio.h>
int main()
{
int n,i,j=1,m;
char alpha;
printf("enter a number");
scanf("%d",&n);
m=n;
for(i=1;i<=n;i++)
{
    alpha='A';
    printf("%c",alpha);
  for(j=1;j<m;j++)
  {
      alpha=alpha+1;
    printf("%c",alpha);
  }
  if(j>=m)
  {
      if(m!=n)
        printf("%c",alpha);
      while(j!=1)
      {
          alpha=alpha-1;
          printf("%c",alpha);
          j--;
      }
  }
  printf("\n");
  m--;
}
return 0;
}

Method 3:
//Shravya Shetty 
import java.io.*;

public class test {
public static void main(String agrs[]) throws IOException{
char ch;
int i=0,m;
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
System.out.print("enter the number of lines you want to print :");

int n=Integer.parseInt(br.readLine());
m=n;
char arr[]=new char[n+1];
while(n!=0) {
i=0;
for(ch='A' ;ch<('A'+n);ch++)
{
System.out.print(ch+" ");
arr[i++]=ch;

}

for(i=(n-1);i>=0;i--)
{
if(i==(m-1)) {
continue;
}
System.out.print(arr[i]+" ");
}
System.out.println();
n--;
}
}
}

Perfect Number

Question;
























Solution:
// Credits: Rakshita

#include<stdio.h>
int main(){
  int n,i=1,sum=0;

  printf("Enter a number: ");
  scanf("%d",&n);

  while(i<n){
      if(n%i==0)
           sum=sum+i;
          i++;
  }
  if(sum==n)
      printf("%d is a perfect number",i);
  else
      printf("%d is not a perfect number",i);

  return 0;
}

Swap two Variable Without Using third Variable

Question:
























Solution:

#include<stdio.h>
int main(){
    int a=5,b=10;
//process one  
//Credits: Arjun and Shravya Kodli.
    a=b+a;
    b=a-b;
    a=a-b;
    printf("a= %d  b=  %d",a,b);

//process two
    a=5;
    b=10;
    a=a+b-(b=a);
    printf("\na= %d  b=  %d",a,b);

//process three
    a=5;
    b=10;
    a=a^b;
    b=a^b;
    a=b^a;
    printf("\na= %d  b=  %d",a,b);

//process four
    a=5;
    b=10;
    a=b-~a-1;
    b=a+~b+1;
    a=a+~b+1;
    printf("\na= %d  b=  %d",a,b);

//process five
    a=5,
    b=10;
    a=b+a,b=a-b,a=a-b;
    printf("\na= %d  b=  %d",a,b);
    return 0;
}

Add two number Without Using Addition Operator

Question:













Solution:

1. Recursion

int add(int, int);
int main() {
   int num1, num2;

   printf("\nEnter the two Numbers : ");
   scanf("%d %d", &num1, &num2);

   printf("\nAddition of two num is : %d", add(num1, num2));
   return (0);
}

int add(int num1, int num2) {
   if (!num1)
      return num2;
   else
      return add((num1 & num2) << 1, num1 ^ num2);
}


2. Looping 1

int main() {
   int num1 = 10, num2 = 5, i;

   while (num2 > 0) {
      num1++;
      num2--;
   }

   printf("%d", num1);
   return (0);
}


3. Looping 2

int main() {
int num1 = 10, num2 = 5, i;

while (num2--) {
num1++;
}

printf("Sum is : %d", num1);
return (0);
}


4. Looping 3

int sum(int, int);
int main() {
   int a, b;

   printf("Enter the two Numbers: ");
   scanf("%d %d", &a, &b);

   printf("Addition of two num. is : %d", add(a, b));
   return(0);
}

int add(int num1, int num2) {
   int i;
   for (i = 0; i < num2; i++)
      num1++;
   return num1;
}


5. Using Subtraction for Addition!

int main() {
   int num1 = 10, num2 = 5;

   num1 = num1 - (-num2);
   printf("Sum is : %d",num1);

   return (0);
}

6. Using Multiplication and Subtraction for Addition!
//Rakshita

#include<stdio.h> int main() { int w,x,y,z; printf("enter 2 numbers\n"); scanf(%d%d",x,y); w=x*y-x-y; z=x*y-w; printf("%d",z); return 0; }

7. Using Complimentary function
//Shravya Shetty

#include<stdio.h> void main(){ int a=5,b=0; int res; res=a - ~b -1; printf("Answer%d",res); }

Aptitude Hack#133(6-07-19)

Question:

In a lottery, there are 10 prizes and 25 blanks. A lottery is drawn at random. What is the probability of getting a prize?

A. 1/10
B.  2/5
C.  2/7
D.  5/7

The Interview Question Today#133(06-7-19)


Friday 5 July 2019

The Interview Question Today#132(05-7-19)


Aptitude Hack#132(05-7-19)

Question:

217 x 217 + 183 x 183 = ?

A. 79698
B. 80578
C. 80698
D. 81268


Thursday 4 July 2019

Aptitude Hack#131(04-7-19)

Question:

The calendar for the year 2007 will be the same for the year:

A. 2014
B. 2016
C. 2017
D. 2018

The Interview Question Today#131(04-7-19)


Wednesday 3 July 2019

Aptitude Hack#130(3-7-19)

Question:

The largest 4 digit number exactly divisible by 88 is:

A. 9944
B. 9768
C. 9988
D. 8888
E. None of these


The Interview Question Today#130(03-7-19)


Tuesday 2 July 2019

The Interview Question Today#129(02-7-19)


Aptitude Hack#129(2-7-9)

Question:

The banker's gain of a certain sum due 2 years hence at 10% per annum is Rs. 24. The present worth is:

A. Rs. 480
B. Rs. 520
C. Rs. 600
D. Rs. 960