This document lists 53 basic coding questions that cover a variety of programming concepts including writing simple programs to print text, perform mathematical operations, use conditional statements, loops, functions, strings, files and more. The questions are for languages like C/C++, Python and Java and involve writing code to find factors, check if a number is prime, palindrome or Armstrong, generate Fibonacci series, swap values without a temporary variable and other common programming exercises.
This document lists 53 basic coding questions that cover a variety of programming concepts including writing simple programs to print text, perform mathematical operations, use conditional statements, loops, functions, strings, files and more. The questions are for languages like C/C++, Python and Java and involve writing code to find factors, check if a number is prime, palindrome or Armstrong, generate Fibonacci series, swap values without a temporary variable and other common programming exercises.
This document lists 53 basic coding questions that cover a variety of programming concepts including writing simple programs to print text, perform mathematical operations, use conditional statements, loops, functions, strings, files and more. The questions are for languages like C/C++, Python and Java and involve writing code to find factors, check if a number is prime, palindrome or Armstrong, generate Fibonacci series, swap values without a temporary variable and other common programming exercises.
This document lists 53 basic coding questions that cover a variety of programming concepts including writing simple programs to print text, perform mathematical operations, use conditional statements, loops, functions, strings, files and more. The questions are for languages like C/C++, Python and Java and involve writing code to find factors, check if a number is prime, palindrome or Armstrong, generate Fibonacci series, swap values without a temporary variable and other common programming exercises.
2. Write a program to display the list of even numbers. 3. Find the Factorial of a given number. 4. Compare Two Numbers using the else-if statement and output smaller and larger numbers. 5. Write a program to determine If the given year is a Leap year. 6. Print all the elements in the Fibonacci number series. 7. Hint: This program can be implemented using a loop or recursion technique. 8. Write a program to check if the number is a Palindrome number or not. 9. Generate all the prime numbers between one & the given number. 10. Print the Pyramid of stars using nested for loops. 11. Print Reversed pyramid on programming console using for loops & decrement operator. 12. Write a program for Nested Switch. 13. Write a program to calculate Circle Area using radius. 14. Find the Factorial of a number using the recursion technique. 15. Print the Pyramid of numbers using for loops. 16. Write a program to Find a Maximum of Two Numbers using the conditional operator. 17. Write a program to Find a Minimum of Two Numbers using the conditional operator. 18. Write a program that will read a float type value from the keyboard and print the following output. 1) the smallest integer which is not less than the number 2) given the number 3) the largest integer which is not greater than the number 19. Find second largest/smallest element in the array list. 20. Choose the random number from the array. (Python) 21. Check if all the elements in the array are the same. (Python) 22. Print all the unique numbers from the array. (Python) 23. Write a program to generate 5 Random nos. between 1 to 100 and the number should not contain a decimal value. 24. Write a program to display a grade according to Marks obtained by the student. 25. Find SUM AND PRODUCT of a given Digits in the number. 26. Write a program to find the sum of all integers greater than 150 and less than 290 that are divisible by 3. 27. Write a program to concatenate strings using for Loop. 28. Display Multiplication Table for the given number. 29. Write a program to Swap the values given by the user without using the third variable. (Python) 30. Write a program to convert given the number of days into months and days. (For the sake of simplicity, assume that each month contains 30 days). 31. Print the Invert Triangle using the while loop. 32. Write a program to find whether given no. is Armstrong or not. 33. How to check if the given number is the power of 3 (k- any integer)? 34. Write a program to print the day of the week based on the given number using the switch case. (For example, print “Monday” for user input 1, print “Tuesday” for user input 2…) 35. What is the Harmonic Series? Write a program to generate the Harmonic Series. 36. Write a program to find the average of consecutive n-Odd numbers and n-Even numbers. 37. Print the Triangle as follow, using for loops. 1 2 3 4 5 6 7 8 9 10 … N 38. Create the class having a member variable of employee detail and getter and setter function for each variable. 39. Write the program to read and write a file. (Python, C/C++) 40. Find the longest line from the file. (Python) 41. Take the students Mark as User input and check the range of Mark. (Java) 42. String Handling 43. Find the first duplicate/repeated character in the string. (Python) 44. Write a program to check if the substring is present in the given string. (C/C++) 45. Write a program to reverse the given string. (Python) 46. How to reverse a string without affecting special characters? 47. How to convert the given string to an integer value? (C/C++) 48. Write a program to check the Palindrome String. (C/C++) 49. Write a program to check the Anagram String. (C/C++, Python) 50. Remove white spaces from the given string. (C/C++) 51. Find all the permutations of the given string. (Python) 52. Find Remainder without using Modulus Operator 53. Remove all the duplicate characters from the string