Basic programming

Basic Programming Questions with example

Basic Questions

  1. Write a program to print hello world
  2. Write a program to print the entire prime number between 1 to 300
  3. Write a program to print all prime numbers till N
  4. Write a program to receive a five-digit number and display it as like 2,4,6,8,9
  5. Write a function that returns the sum of all the odd digits of a given positive number
  6. Write a program to print the area of a rectangle using the function and return its value to the main function
  7. Write a program to calculate the factorial of a given number using the function
  8. Write a program to display Characters from A to Z Using Loop
  9. Write a program to check if a given character is a vowel or consonant.
  10. Write a program to check the character is an alphabet or not
  11. Write a program to convert binary number to decimal number
  12. Write a program to convert a decimal number into a binary number
  13. Write a program to calculate the GCD of given numbers using recursion
  14. Write a program to find the sum of digits of a given number using recursion
  15. Write a program to find whether the number is Armstrong number
  16. Write a program to print all the Armstrong number between 100 to 500
  17. Write a program to find the factorial of a given number using recursion
  18. Write a program to check whether a given string is palindrome or not
  19. Write a program to print the ASCII value of a given character
  20. Write a program to remove all the blank space from the string and print it, also count the number of characters

Series Questions
  1. Write factorial function and use the function to find the sum of series 1! +2!....n!
  2. Write a program to generate a sum of 1! + 2! +3! ... +n!
  3. Write a program to print the Fibonacci series up to n terms
  4. Write a program to print the Fibonacci series
  5. Write a program to find the sum of the Fibonacci series using the function

Array Questions

Pointer Questions

Matrix Questions


No comments:

Post a Comment