This document lists 21 programming questions that could be asked during an interview. The questions cover a range of fundamental programming concepts like calculating factorials, checking if a number is even/odd, swapping values with and without temporary variables, finding the greatest of multiple numbers, checking if a number is prime or a palindrome, generating Fibonacci sequences, deleting lines from a text file, and more.
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
76 views
Interview Prospective Programming Questions
This document lists 21 programming questions that could be asked during an interview. The questions cover a range of fundamental programming concepts like calculating factorials, checking if a number is even/odd, swapping values with and without temporary variables, finding the greatest of multiple numbers, checking if a number is prime or a palindrome, generating Fibonacci sequences, deleting lines from a text file, and more.
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14
Interview prospective programming
questions
1. Write a program to find factorial of the given number. ?
2. Write a program to check whether the given number is
even or odd. 3. Write a program to swap two numbers using a temporary variable.
4. Write a program to swap two numbers without using a
temporary variable. 5. Write a program to swap two numbers using bitwise operators. 6. Write a program to find the greatest of three numbers.
7. Write a program to find the greatest among ten
numbers. 8. Write a program to check whether the given number is a prime.
9. Write a program to check whether the given number is
a palindrome c number. 10. Write a program to check whether the given string is a palindrome. 11. Write a program to generate the Fibonacci series.
12. Write a program to print "Hello World" without using
semicolon anywhere in the code. 13. Write a program to print a semicolon without using a semicolon anywhere in the code. 14. Write a program to delete a specified line from a text file. 15. Write a program to find the number of lines in a text file.
16. Write a program to display the multiplication table of a
given number. 17. WAP to find out the longest word in a string.
18. WAP to print the triangle of letters in increasing order
of lines.. 19. WAP to print 'xay' In place of every 'a 'in a string
20. Count the Total Number of 7 coming between 1 to 100.
21. WAP to find out if a given number is a power series of 2 or not?