C Programming Questions

Programming challenges for beginners and mid-level C programmers.

Arrays

  • Array Intersection Calculator
  • Array Leaders Finder
  • Array Product excluding Self Calculator
  • Array Right Rotator
  • Divisible Sum Pairs Checker
  • Duplicate Number Detector
  • Duplicate Remover without Libraries
  • Equilibrium Index Finder
  • kth Max-Min Element Retriever
  • Longest Consecutive Subsequence Locator
  • Majority Element Identifier
  • Max-Min Finder in an Unsorted Array
  • Minimum Sum Subarray Finder
  • Missing Number Finder in a 1 to 500 Sequence
  • Multiple Duplicates Identifier
  • Occurrence Counter in a Sorted Array
  • Peak Element Identifier
  • Positive Negative Rearranger
  • Quicksort Array Sorter
  • Self Referential Array Transformer
  • Sorted Arrays Merger
  • Target Sum Pairs Locator
  • Two Repeating Elements Finder
  • Zero Mover to the Left
  • Zero Sum Subarray Detector

Bit Manipulations

  • Calculate a Power b using Bit Manipulation
  • Check for Alternate Bits
  • Check if Binary Representation of a Number is Palindrome
  • Check if Number is Multiple of 3
  • Clear Bits from MSB to i
  • Convert Decimal to Binary
  • Count Number of Flips to Convert A to B
  • Count Set Bits
  • Detecting Power of Two
  • Determine if Two Integers have Opposite Signs
  • Extract n Bits
  • Find Parity of a Number
  • Find Two Unique Numbers in Array
  • Find a Unique Number in an Array
  • Generate All Possible Combinations of n Bits
  • Implement Bitwise Right Shift
  • Implement XOR without using XOR operator
  • Isolate the Rightmost Set bit
  • Mask Certain Bits
  • Reverse Bits in a Byte
  • Rotate Bits
  • Set Bits without Using Arithmatic Operations
  • Single Number in Array
  • Swap Odd and Even Bits
  • Toggle 3rd and 5th Bits

Linked List

  • Add Numbers Represented by Lists
  • Clone Linked List with Random Pointer
  • Common Ancestor in Binary Tree Doubly Linked List
  • Compare Strings as Linked Lists
  • Convert Binary Number to Integer
  • Delete Alternate Nodes
  • Detect and Remove Loop
  • Detect Cycle in Linked List
  • Find Middle Element
  • Find nth Node from End
  • Flatten Multi-level Linked List
  • Intersection Point Two Lists
  • Length of Linked List
  • Linked List is Palindrome
  • Merge Sort on Linked List
  • Merge Two sorted lists
  • Move Last Element to Front
  • Pairwise Swap Elements
  • Partition Linked List around Value
  • Remove Duplicate Unsorted
  • Remove Nodes of Specific Value
  • Reverse Linked List
  • Reverse Linked List No recursion
  • Segregate Even and Odd Nodes
  • Sum of Linked Lists using Stack

Linux Internals

  • CPU Information Fetcher
  • CPU Scheduling Algorithm
  • Command Line Argument Parser
  • Custom Signal Handling
  • Custom Init Process
  • Custom malloc free
  • Custom ps command
  • File Copy Program
  • Filesystem Traversal opendir readdir
  • Implement Priority Inversion Handling
  • Implement Simple Shell
  • Implement chmod Command
  • Implement ping Command
  • Implement tail Command
  • Implement watch Command
  • Implement whois Command
  • Mutex based File Access
  • Priority Inversion Problem
  • Process Forking Waiting
  • Semaphore based Producer Consumer
  • Terminal Multiplexer
  • Thread Creation Synchronization
  • User Space File Reader
  • User Space to Kernel Space Communication
  • Zero Copy Data Transfer

Memory Management

  • Custom strdup Function
  • Dynamic Array
  • Fragmentation Detector
  • Garbage Collector Simulator
  • Heap Metadata Inspector
  • Memory Bound Priority Queue
  • Memory-Mapped Circular Buffer
  • Memory Access Logger
  • Memory Alignment Checker
  • Memory Defragmenter
  • Memory Footprint Analyzer
  • Memory Initialization Library
  • Memory Leak Detector
  • Memory Offset Calculator
  • Memory Overlay Management
  • Memory Pool
  • Memory Saefty Checker
  • Memory Statistics Reporter
  • Object Serialization
  • Segmented Memory Allocator
  • Slab Allocator
  • Stack-based Memory Allocator
  • Stack Overflow Detector
  • Virtual Memory Simulator
  • Write-Once Memory Simulator

Pointers

  • Calculate Dot Product of Vectors
  • Check Pointers Point to Same Array
  • Check String Palindrome
  • Check String Prefix
  • Concatenate Strings without Lib
  • Convert String to Lowercase
  • Count Array Elements without Loop
  • Custom memcpy Function
  • Custom strtok Function
  • Detect Pointer out of Bounds
  • Find Array Intersection
  • Find Common Elements in Sorted Arrays
  • Find Data Type Size without sizeof
  • Find First Non Repeated Charcater
  • find Linked List Lenght
  • Find Overlapping Elements in Arrays
  • Flatten 2D Array to 1D
  • Memory Leak Detector
  • Merge Two Sorted Arrays
  • Move 2D Point
  • Rotate Array by k Elements
  • Segregate Even and Odd using Pointers
  • Split String into Halves
  • Swap Two Strings using Pointers
  • Trim String Whitespace

Searching

  • Binary Search Recursive
  • Count Array Rotations
  • Count Number Occurrences
  • Exponential Search
  • Fibonacci Search
  • find Kth Max-Min
  • Find First and Last Occurrence
  • Find Fixed Point
  • Find Majority Element
  • Find Missing Number 1 to n
  • Find Peak Element
  • Find Repeating Missing
  • Find Smallest Missing
  • Interpolation Search
  • Jump Search
  • Search Bitonic Array
  • Search nearly Sorted Array
  • Search Sorted Array
  • Search Sorted Matrix
  • Search Sorted Rotated Array
  • Search Unknown Length Array
  • Search Unsorted Array
  • Sentinal Search
  • Ternary Search
  • Two Numbers sum N

Sorting

  • Bead Sort
  • Bitonic Sort
  • Bogo Sort
  • Bucket Sort
  • Cocktail Sort
  • Comb Sort
  • Counting Sort for Negative Numbers
  • Cycle Sort
  • Dynamic Gap Shell Sort
  • Gnome Sort
  • Heap Sort with Binary Max Heap
  • In Place Merge Sort
  • Iterative Quick Sort
  • Linked List Insertion Sort
  • Odd Even Sort
  • Optimized Bubble Sort
  • Pancake Sort
  • Patience Sort
  • Permutation Sort
  • Pigeonhole Sort
  • Radix Sort for Floating Points
  • Recursive Mereg Sort
  • Sleep Sort
  • Stooge Sort
  • Tim Sort

Stakcs and Queues

  • Balanced Parentheses Stack
  • Byte-Packing Stack
  • Circular Queue
  • Command Parser
  • Expression Validator
  • Function Call Logger
  • Min-Element Stack
  • Multi-Stack Array
  • Nested Statement counter
  • Palindrome Checker
  • Post-order Traversal Stack
  • Priority Queue Heap
  • Queue based Cache
  • Queue based Logger
  • Queue based Sequence Generator
  • Querue based Text filter
  • Queue Two Priorities
  • Queue from Stacks
  • Radix Sort Queue
  • Recursive to Iterative Converter
  • Stack based Calculator
  • Stack based Text Editor
  • Stack Sorting
  • String Message Queue
  • Undo Redo Stack

Strings

  • Alphabetically Encoding a String
  • Checking Anagrams between Two Strings
  • Counting balanced Zero-One Substrings
  • Counting Character Occurrences in a String
  • Counting Substring Occurrences in a String
  • Coiutning Vowels and Consonants in a String
  • Discovering the Longest Palindromic Substring
  • Evaluating Repeated Substring Patterns
  • Evaluating String Interleaving
  • Finding Lexicographically Minimal String Rotation
  • Finding the First Unique Character in a String
  • Generating All String Permutations
  • Identifying Duplicate Characters in a String
  • Identifying Longest Substring without Repeats
  • Listing Multiple Occurrences of Characters in a String
  • Minimizing Palindromic Partitions
  • Palindrome Validation for Strings
  • Pangram Verification
  • Recursive String Reversal
  • Reversing Words in a Sentence without Libraries
  • String to Integer Conversion without Built-in Functions
  • Validating Balanced PArentheses in a String
  • Verifying Numeric-only Characters in a String
  • Verifying String Rotations

Structures and Unions

  • 32bit Value Access
  • 3D Point Distance
  • 4-Byte Value Conversion
  • IP Address Conversion
  • IP Address Representation
  • Book Price Discount
  • Color RGB CMYK
  • Command Parsing
  • Complex Number Operations
  • Data Packet Serialization
  • Data Difference
  • Device Config bitfields
  • Employee Address
  • Endianness Conversion
  • Error Code Representation
  • File Attributes
  • Library Database
  • Menu Item Function Pointer
  • Network Packet Type
  • Structure Memory Optimization
  • Student Average Marks
  • Student Linked List
  • Time Operations
  • Variable Datatype Array
  • Vehicle Extended Structure