Basic Programming Questions 2017

Basic Programming Questions 2017

  1. Write a program to find the average of three numbers input by user.
  2. Write the program to find the parentage of the marks obtain by a student in three subjects.
  3. Write a program to interchange the value of the variable by using a third variable.
  4. Write a program to interchange the value of the variable without using third variable with two methods.
  5. If a three-digit number is input through the keyboard, write a program to find the sum of its digit.
  6. If a three digit number input through the keyboard, write a program to reverse the number.
  7. If the four digit number is input through the keyboard, write a program to find the sum of its first and last digit.
  8. Any year is input through through the keyboard. Write a program to determine whether the year is a leap year or not.
  9. Write a program to find the greatest number between three numbers.
  10. Find the absolute value of a number entered through the keyboard.
  11. If the three sides of the triangle are entered through the keyboard, write a program to check whether the triangle is valid or not. The triangle is valid if the sum of sides is greater than the largest of the three sides.
  12. If the three sides of the triangle are entered through the keyboard , write a program to check whether the triangle is isosceles, equilateral or scalene.
  13. Write a program to count the occurrence of a particular digit in a four digit number which is input by user.
  14. Write a program to print the table of a given number which is entered through the keyboard. In the following formatting:
      1. 2*1=2
      2. 2*2=4
  15. Write a program to check the input number is prime number or not.
  16. Write a program to find prime numbers between 2 to 999, print them.
  17. Write a program to find the factorial value of any number entered through the keyboard.
  18. Two numbers are entered through the keyboard. Write a program to find the value of one number raised to the power of another.
  19. Write a program to print all Armstrong numbers between 1 and 500.
  20. Write a program to receive an integer and find its binary equivalent.
  21. Write a program to reverse the number which is entered through the key board.
  22. Write a program to find the sum of its digit of the number which is entered through the key board.
  23. Write a program to find the number of odd number and even number between 34 to 67.
  24. Write a program to check whether a number is perfect or not.
  25. Write a program to enter ten numbers in an Array and print them on the screen.
  26. Write a program to find the sum of all numbers input in the array.
  27. Write a program to check how many numbers are prime in an array and print them.
  28. Write a program to copy the element of one array into another.
  29. Write a program to find the largest and smallest number of the array and print them.
  30. Write a program to reverse the element of the array in the same array and print them.
  31. Write a program to sort the array element in the same array in ascending order and descending order.
  32. Write a program to find the number of odd number and even number in the array.
  33. Write a program to count the number of a particular number repeated in the array which is input by user.
  34. Write a program to store the marks of the 5 subjects in an array and find the parentage of that student.
  35. Write a program to concanate two array elements into a single array and print them.
  36. Write a program to find the sum of the elements available in two arrays and store in the third array.
  37. Write a program to find the length of the string.
  38. Write a program to reverse the string.
  39. Write a program to check the string is palindrome or not.
  40. Write a program to compare two strings.
  41. Write a program to case sensitive comparison of the string.
  42. Write a program to copy the string into another variable.
  43. Write a program to convert the case of the character if lower case then converts it into upper case and vice versa.
  44. Write a program to merge two strings into a single string.
  45. Write a program to replace a character of string with another character.
  46. Write a program to count the occurrence of a specific character in a string.
  47. Write a program to split the string into two equal chunks.
  48. Write a program to count the number of words of the string.
  49. Write a program to replace a specific word with another word of a string.
  50. Write a program in PHP to add, subtract, multiply and divide two arrays of 3*3.
  51. Write a program in PHP to create a magic matrix.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top
×

Hello!

Click one of our contacts below to chat on WhatsApp

× WhatsApp Us