Basic Programming Questions with example
Basic Questions
- Write a program to print hello world
- Write a program to print the entire prime number between 1 to 300
- Write a program to print all prime numbers till N
- Write a program to receive a five-digit number and display it as like 2,4,6,8,9
- Write a function that returns the sum of all the odd digits of a given positive number
- Write a program to print the area of a rectangle using the function and return its value to the main function
- Write a program to calculate the factorial of a given number using the function
- Write a program to display Characters from A to Z Using Loop
- Write a program to check if a given character is a vowel or consonant.
- Write a program to check the character is an alphabet or not
- Write a program to convert binary number to decimal number
- Write a program to convert a decimal number into a binary number
- Write a program to calculate the GCD of given numbers using recursion
- Write a program to find the sum of digits of a given number using recursion
- Write a program to find whether the number is Armstrong number
- Write a program to print all the Armstrong number between 100 to 500
- Write a program to find the factorial of a given number using recursion
- Write a program to check whether a given string is palindrome or not
- Write a program to print the ASCII value of a given character
- Write a program to remove all the blank space from the string and print it, also count the number of characters
Command Line argument Questions
- Write a program to find the sum of two numbers using command line argument
- Write a program to find the factorial of a given number using command line argument
- Write a program to print a number using command line argument
- Write a program to find the sum of digits of a number using command line argument
- Write a program to find the average of two numbers using command line argument
- Write a program to find the smallest of two numbers using command line argument
- Write a program to find the greatest of two numbers using command line argument
Series Questions
- Write factorial function and use the function to find the sum of series 1! +2!....n!
- Write a program to generate a sum of 1! + 2! +3! ... +n!
- Write a program to print the Fibonacci series up to n terms
- Write a program to print the Fibonacci series
- Write a program to find the sum of the Fibonacci series using the function
No comments:
Post a Comment