-->

Tuesday, November 10, 2020

author photo

 5 Interview Questions in the Coding test of WhiteHat Jr

As most of you aware of the coding test of WhiteHat Jr teacher recruitment. Now they are hiring the teacher only for the Applied Tech level. So, you must have a good knowledge of coding. If you are a non-coder then you have to be strong in logical thinking. As a programmer, you must know the logic of the problem to get a solution for it.

Let me share with you the sample questions and also the questions that were asked in the Coding Test. If you are really interested to be a WhiteHat teacher, then kindly don't mug up the program. Instead, you try to understand the logic behind the program and work on it. Read on the 5 questions that were asked in the coding test of WhiteHat Jr.

  • Checking Armstrong number
  • The square root of a number is equal to the cube root
  • Area of a square inscribed in a circle
  • Shuffle the string
  • Multiple of the given number of the given length
 

Solutions in C language to the question asked in the WhiteHat JR Coding test

1.Check the Armstrong number


#include <stdio.h>

int main(void) {
// your code goes here
        
        int num,rem,temp,result=0;
scanf("%d",&num);
temp=num;
while(num!=0)
{
rem=num%10;
result=result+(rem*rem*rem);
num=num/10;
}
if(temp==num)
printf("1");
else
printf("0");
return 0;
}

Sample Result:

Input: 153
Output: 1

Input: 258
Output: 0


2.The square root of a number is equal to the cube root. Print 1 if the square root of a number is equal to the cube root and print 0 if the square root of a number is not equal to the cube root.


#include <stdio.h>

int main(void) {
// your code
int num1, num2, sqrt_num1,cbrt_num2;
scanf("%d %d",&num1,&num2);
        sqrt_num1 = sqrt(num1);
        cbrt_num2 = cbrt(num2);
        if(sqrt_num1==cbrt_num2)
        printf("1");
        else
printf("0");
return 0;
}

Sample Result:

Input: 4  8
Output: 1

Input: 5   76
Output: 0


3. Area of a square inscribed in a circle


#include <stdio.h>

int main(void) {
// your code
int radius,area;
scanf("%d",&radius);
area=2*radius*radius;
printf("%d",area);
return 0;
}

Result:

Sample Input: 5
Output: 100

4. Shuffle/Swap the string


#include<stdio.h>
#include<string.h>
int main(void) {
// your code goes here
 char str1[100],str2[100],temp[100];
gets(str1);
gets(str2);
strcpy(temp,str1);
strcpy(str1,str2);
strcpy(str2,temp);
printf("%s %s",str1,str2);
return 0;
}

Result:

Sample Input: beautiful house
Output: house beautiful

5. Multiple of the given number of the given length


#include <stdio.h>
int num,length,i
int multiple(int,int);
int main(void) {
// your code goes here
scanf("%d %d",&num,&length);
for(i=1;i<=length;i++)
{
printf("%d\t",multiple(num,i);
}
return 0;
}

int multiple(int num,int length)
{
int product;
product=num*length;
return product;
}

Sample Input: 3 5
Sample Output: 3 6 9 12 15

My Experience: How I cleared the WhiteHat Jr coding test for teachers

  • Your test timer will get started immediately after you pressed the Start Test button. In case you have any queries, ask the interviewer before the test and also share your mail id with your interviewer before the test.
  • Every 5 questions get opened in a separate tab. So you can write code for any question. And also don't press the forward/backward/refresh/close button.
  • Their panel navigation is very very tricky. It actually eats up your time. You might feel that 45 minutes is not enough to complete a test.
  • In their panel, You can select the programming language at the bottom of their interface. Their default selected programming language is Python. In case you select some other language, scroll down and select the coding language for every 5 questions.
  • The Run button is at the right bottom of the vesta interface. You press the Run button to execute the program.
  • If your program is successfully executed without error, it shows as accepted(100% or 60% or 40%). If your program works, it actually doesn't show the output window. Instead, it shows as accepted(in green color) and error (in red color).
  • The 100% or 60% or 40 % indicates the marks you have scored in the test.
  • This is a very very important tip. Kindly check your program syntax or any error before you run the program. Because if you got an error while executing the program, even though you fix the error. It shows the same error and not executed successfully. So kindly check before the error.
  • If you didn't get the output for a program, kindly move on to the next program. Don't waste your time on that program.

Sample questions of WhiteHat Jr coding test::
  • Print a triangle
  • Find the sum of series
  • Power range
  • First Before Second Letter



Final Note

There is a final demo round after the coding test level. You have to attend the demo round in 3 to 5 days. I hope the post "Follow these tips to crack the WhiteHat Jr coding test interview for teachers" would be useful for you. I wish you all the very best for your interview.







 


your advertise here

1 Comment:

avatar
Unknown delete November 11, 2020 at 11:57 AM

Thank you for this post da..I need answers for these question in python language. Kindly do post da..I have interview tomorrow

Reply


EmoticonEmoticon

Next article Next Post
Previous article Previous Post