Basic Programming Questions 2017
- Write a program to find the average of three numbers input by user.
- Write the program to find the parentage of the marks obtain by a student in three subjects.
- Write a program to interchange the value of the variable by using a third variable.
- Write a program to interchange the value of the variable without using third variable with two methods.
- If a three-digit number is input through the keyboard, write a program to find the sum of its digit.
- If a three digit number input through the keyboard, write a program to reverse the number.
- If the four digit number is input through the keyboard, write a program to find the sum of its first and last digit.
- Any year is input through through the keyboard. Write a program to determine whether the year is a leap year or not.
- Write a program to find the greatest number between three numbers.
- Find the absolute value of a number entered through the keyboard.
- 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.
- 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.
- Write a program to count the occurrence of a particular digit in a four digit number which is input by user.
- Write a program to print the table of a given number which is entered through the keyboard. In the following formatting:
- 2*1=2
- 2*2=4
- Write a program to check the input number is prime number or not.
- Write a program to find prime numbers between 2 to 999, print them.
- Write a program to find the factorial value of any number entered through the keyboard.
- Two numbers are entered through the keyboard. Write a program to find the value of one number raised to the power of another.
- Write a program to print all Armstrong numbers between 1 and 500.
- Write a program to receive an integer and find its binary equivalent.
- Write a program to reverse the number which is entered through the key board.
- Write a program to find the sum of its digit of the number which is entered through the key board.
- Write a program to find the number of odd number and even number between 34 to 67.
- Write a program to check whether a number is perfect or not.
- Write a program to enter ten numbers in an Array and print them on the screen.
- Write a program to find the sum of all numbers input in the array.
- Write a program to check how many numbers are prime in an array and print them.
- Write a program to copy the element of one array into another.
- Write a program to find the largest and smallest number of the array and print them.
- Write a program to reverse the element of the array in the same array and print them.
- Write a program to sort the array element in the same array in ascending order and descending order.
- Write a program to find the number of odd number and even number in the array.
- Write a program to count the number of a particular number repeated in the array which is input by user.
- Write a program to store the marks of the 5 subjects in an array and find the parentage of that student.
- Write a program to concanate two array elements into a single array and print them.
- Write a program to find the sum of the elements available in two arrays and store in the third array.
- Write a program to find the length of the string.
- Write a program to reverse the string.
- Write a program to check the string is palindrome or not.
- Write a program to compare two strings.
- Write a program to case sensitive comparison of the string.
- Write a program to copy the string into another variable.
- Write a program to convert the case of the character if lower case then converts it into upper case and vice versa.
- Write a program to merge two strings into a single string.
- Write a program to replace a character of string with another character.
- Write a program to count the occurrence of a specific character in a string.
- Write a program to split the string into two equal chunks.
- Write a program to count the number of words of the string.
- Write a program to replace a specific word with another word of a string.
- Write a program in PHP to add, subtract, multiply and divide two arrays of 3*3.
- Write a program in PHP to create a magic matrix.