NPAV (Net Protector Antivirus) Interview Experience | On-Campus 2021

• Difficulty Level : Hard
• Last Updated : 04 Feb, 2021

NPAV generally conducts on-campus pen and paper tests as the first round. All questions were to be solved using C/C++ only. The total time allotted was 1 hr.

1. Given an input number, print the smallest digit (10marks)

E.g.

Input: 519
Output: 1
2. Print the given number into words(10 marks)

3. Take 16 digit input from the user and print:

• Sum of first and last digit in the sequence

• Multiplication of every 2nd and 3rd digit in the sequence (10marks)

E.g.

Input: 1 2 3 4     5 6 7 8    9 10 11 12   13 14 15 16
Sum = 5 (1+4), Multiplication = 6 (2*3)
Sum = 13, Multiplication = 42
Sum = 21, Multiplication = 110
Sum = 29, Multiplication = 210
4. Take input from the user as name and birthplace and output is as follows: (10marks)

Input:

Output:

5. Given the marks for 10 students for Physics, Chemistry, and Mathematics, calculate the average and find the second highest and the second-lowest average score (10marks)

Input:

Output:

2nd highest average = 88
2nd lowest average = 60
My Personal Notes arrow_drop_up