0% found this document useful (0 votes)
102 views2 pages

Programming Fundamentals Questions

This document lists common programming fundamental interview questions that assess candidates' skills in logic, string manipulation, array operations, and problem-solving. It includes basic, intermediate, and additional questions covering topics such as number manipulation, string operations, and array handling. The questions are designed to evaluate a candidate's understanding of core programming concepts and their ability to solve problems efficiently.

Uploaded by

Mian Daniyal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views2 pages

Programming Fundamentals Questions

This document lists common programming fundamental interview questions that assess candidates' skills in logic, string manipulation, array operations, and problem-solving. It includes basic, intermediate, and additional questions covering topics such as number manipulation, string operations, and array handling. The questions are designed to evaluate a candidate's understanding of core programming concepts and their ability to solve problems efficiently.

Uploaded by

Mian Daniyal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Programming Fundamental Interview

Questions
This document contains common programming fundamental questions often asked
in interviews. These questions test basic logic, string manipulation, array
operations, and problem-solving skills.

Basic Programming & Logic Questions


1. Swap two numbers without using a third variable

2. Check if a number is prime

3. Reverse a string

4. Check if a string is a palindrome

5. Find factorial of a number (using recursion and iteration)

6. Find Fibonacci series up to N terms

7. Check if two strings are anagrams

8. Count vowels and consonants in a string

9. Find largest and smallest element in an array

10. Sum of digits of a number

Intermediate Logic Questions


11. Find the missing number in an array (numbers from 1 to n)

12. Check if a number is Armstrong

13. Find duplicate elements in an array

14. Sort an array without using built-in functions (Bubble Sort, Selection Sort,
Insertion Sort)

15. Remove duplicates from a string or array

16. Find the second largest element in an array


17. Print pattern programs (e.g., *, **, ***)

18. Reverse an array in place

String & Array Manipulation


19. Check if two strings are rotations of each other

20. Find first non-repeating character in a string

21. Find the frequency of characters in a string

22. Implement basic string compression (e.g., aaabbcc → a3b2c2)

Additional Questions
23. Create and manipulate a 2D array (Matrix operations)

24. Create and manipulate a 3D array (Access and modify elements)

25. Write a function to validate email without using filter_var

26. Explain the difference between == and === in PHP

27. Reverse words in a sentence (e.g., 'I love PHP' → 'PHP love I')

You might also like