Function Assignment 30 — Find the Median of Two Sorted Arrays Using a Function
  • Twitter
  • Facebook
  • Snapchat
  • Instagram

C Program: Find the Median of Two Sorted Arrays Using a Function

📑 On this page:
  • What the median is, and why sorted matters
  • Designing the findMedian function
  • Complete C Program
  • Program Output
  • Step-by-Step Explanation
  • Frequently Asked Questions
📚 In this program, you will learn:
  • What the median is — and how it differs for odd- and even-sized datasets
  • How to merge two sorted arrays in O(m+n) time
  • Why the merge step from merge sort is the key building block
  • How to handle the even-length case with an average of two middle elements
  • How to extend this to O(log(min(m,n))) with binary search (the LeetCode hard version)

What the median is, and why sorted matters

The median of a dataset is the "middle" value when the data is sorted. For an odd number of values, it's the single middle element. For an even number of values, it's the average of the two middle elements. So the median of [1, 3, 5] is 3, and the median of [1, 2, 3, 4] is (2 + 3) / 2 = 2.5.

The median has a special property: half the data is above it, half is below. That makes it a robust measure of "central tendency" — it's not skewed by outliers the way the mean is. If Bill Gates walks into a room of ten people, the mean income of the room skyrockets, but the median barely changes. That's why median is used in income statistics, real estate prices, and any context where outliers exist.

Our problem: given two already sorted arrays, find the median of the combined data. You could merge them (O(m+n)) and take the middle — that's the simple approach, and it's what this program does. The hard version (a classic LeetCode hard problem) asks for O(log(min(m,n))) using binary search on the partition point. That's an order of magnitude faster for large arrays, but requires significant cleverness. Starting with the merge approach builds the intuition you'd need to understand the binary-search version.

Because the inputs are sorted, we don't need to sort them again — that's the whole point of the problem. The merge step from merge sort is all we need: two pointers, one per array, walking forward and picking the smaller element each time. The combined array is then sorted, and we can read the middle directly.

💡 In one line: merge the two sorted arrays into one, then return the middle element (if the total length is odd) or the average of the two middle elements (if even). Total time O(m+n).

Two sorted arrays shown merging into one, with the middle element(s) highlighted as the median.

Designing the findMedian function

The signature takes both arrays, their sizes, and returns a double:

Part Choice Why
Function namefindMedianDescriptive. Alternatives: medianOfTwo, combinedMedian.
Inputsconst int a[], int m and const int b[], int nRead-only. Sorted ascending. Sizes passed separately (arrays decay to pointers).
Return typedoubleMedian can be fractional (e.g., 2.5 for even-length data). int would truncate.

The prototype:

double findMedian(const int a[], int m, const int b[], int n);
                                

And the definition:

double findMedian(const int a[], int m, const int b[], int n) {
    int total = m + n;
    int *merged = malloc(total * sizeof(int));
    if (!merged) return 0.0;

    int i = 0, j = 0, k = 0;
    while (i < m && j < n) {
        if (a[i] <= b[j]) merged[k++] = a[i++];
        else               merged[k++] = b[j++];
    }
    while (i < m) merged[k++] = a[i++];
    while (j < n) merged[k++] = b[j++];

    double median;
    if (total % 2 == 1) {
        median = merged[total / 2];
    } else {
        median = (merged[total / 2 - 1] + merged[total / 2]) / 2.0;
    }

    free(merged);
    return median;
}
                                

The merge step uses two pointers, one per array. On each iteration, pick the smaller of a[i] and b[j], append it to the merged array, and advance the corresponding pointer. When one array is exhausted, copy the remaining elements of the other. This is O(m+n) — one pass through both arrays combined.

After merging, the median is at index total/2 if the total is odd, or the average of merged[total/2 - 1] and merged[total/2] if even. The 2.0 in the division forces floating-point arithmetic — /2 would do integer division and truncate.

And here's a version that avoids the extra allocation by finding the middle two elements directly during the merge:

double findMedianNoAlloc(const int a[], int m, const int b[], int n) {
    int total = m + n;
    int mid1 = (total - 1) / 2;
    int mid2 = total / 2;
    int m1 = 0, m2 = 0;
    int i = 0, j = 0;

    for (int count = 0; count <= mid2; count++) {
        int val;
        if (i < m && (j >= n || a[i] <= b[j])) val = a[i++];
        else                                          val = b[j++];

        if (count == mid1) m1 = val;
        if (count == mid2) m2 = val;
    }

    return (m1 + m2) / 2.0;
}
                                

This version doesn't allocate anything — it walks the merge until it's seen enough elements to know the two middle ones. O(1) extra space, same O(m+n) time in the worst case (though it can stop early after mid2+1 elements). For very large arrays, this is better because it avoids the memory overhead and cache pressure of building a full merged array.

And here's the O(log(min(m,n))) version — the one that makes this a "hard" problem on LeetCode:

double findMedianFast(const int a[], int m, const int b[], int n) {
    /* Ensure m <= n so binary search is on the shorter array */
    if (m > n) return findMedianFast(b, n, a, m);

    int lo = 0, hi = m;
    int total = m + n;
    int half = (total + 1) / 2;

    while (lo <= hi) {
        int i = (lo + hi) / 2;         /* elements from a in left half */
        int j = half - i;              /* elements from b in left half */

        int aLeft  = (i == 0) ? INT_MIN : a[i - 1];
        int aRight = (i == m) ? INT_MAX : a[i];
        int bLeft  = (j == 0) ? INT_MIN : b[j - 1];
        int bRight = (j == n) ? INT_MAX : b[j];

        if (aLeft <= bRight && bLeft <= aRight) {
            if (total % 2 == 1) return (aLeft > bLeft ? aLeft : bLeft);
            return ((aLeft > bLeft ? aLeft : bLeft) +
                    (aRight < bRight ? aRight : bRight)) / 2.0;
        } else if (aLeft > bRight) {
            hi = i - 1;
        } else {
            lo = i + 1;
        }
    }
    return 0.0;
}
                                

This version binary-searches the partition point: instead of merging (O(m+n)), it searches for the index i such that the left half of both arrays (size half = (m+n+1)/2) has all elements less than the right half. That partition exists uniquely, and once found, the median is at the boundary. The search runs on the smaller array, so it's O(log(min(m,n))) — a huge speedup for large inputs. The boundary cases (i == 0, i == m, j == 0, j == n) use INT_MIN/INT_MAX as "virtual" sentinels. This is elegant but famously tricky to get right — many people get the boundary conditions wrong on the first try.

🎯 Key idea: merging two sorted arrays is O(m+n) — simple, correct, and fast enough for typical inputs. The O(log(min(m,n))) partition-based solution is faster but trickier. Use the merge version in most cases, unless you're specifically asked for O(log) time or the arrays are massive.

Complete C Program

Program: read two sorted arrays, compute the median

#include <stdio.h>
#include <stdlib.h>

/* Function prototype */
double findMedian(const int a[], int m, const int b[], int n);

int main(void) {
    int a[100], b[100];
    int m, n;

    printf("How many elements in array A? ");
    if (scanf("%d", &m) != 1 || m < 0 || m > 100) return 1;
    printf("Enter %d integers (sorted ascending): ", m);
    for (int i = 0; i < m; i++) {
        if (scanf("%d", &a[i]) != 1) return 1;
    }

    printf("How many elements in array B? ");
    if (scanf("%d", &n) != 1 || n < 0 || n > 100) return 1;
    printf("Enter %d integers (sorted ascending): ", n);
    for (int i = 0; i < n; i++) {
        if (scanf("%d", &b[i]) != 1) return 1;
    }

    if (m + n == 0) {
        printf("Both arrays are empty — median is undefined.\n");
        return 1;
    }

    printf("Median: %.2f\n", findMedian(a, m, b, n));

    return 0;
}

double findMedian(const int a[], int m, const int b[], int n) {
    int total = m + n;
    int *merged = malloc(total * sizeof(int));
    if (!merged) return 0.0;

    int i = 0, j = 0, k = 0;
    while (i < m && j < n) {
        if (a[i] <= b[j]) merged[k++] = a[i++];
        else               merged[k++] = b[j++];
    }
    while (i < m) merged[k++] = a[i++];
    while (j < n) merged[k++] = b[j++];

    double median;
    if (total % 2 == 1) {
        median = merged[total / 2];
    } else {
        median = (merged[total / 2 - 1] + merged[total / 2]) / 2.0;
    }

    free(merged);
    return median;
}
                                    

And a version that traces the merge step by step, so you can see exactly how the combined array is built:

Variant: verbose merge with step trace

#include <stdio.h>
#include <stdlib.h>

void mergeVerbose(const int a[], int m, const int b[], int n, int merged[]) {
    int i = 0, j = 0, k = 0;
    while (i < m && j < n) {
        if (a[i] <= b[j]) {
            printf("  pick a[%d]=%d (a[i]=%d <= b[j]=%d)\n", i, a[i], a[i], b[j]);
            merged[k++] = a[i++];
        } else {
            printf("  pick b[%d]=%d (b[j]=%d < a[i]=%d)\n", j, b[j], b[j], a[i]);
            merged[k++] = b[j++];
        }
    }
    while (i < m) {
        printf("  copy remaining a[%d]=%d\n", i, a[i]);
        merged[k++] = a[i++];
    }
    while (j < n) {
        printf("  copy remaining b[%d]=%d\n", j, b[j]);
        merged[k++] = b[j++];
    }
}

int main(void) {
    int a[] = {1, 3, 5, 7};
    int b[] = {2, 4, 6};
    int m = 4, n = 3;
    int merged[7];

    printf("Merging [1 3 5 7] and [2 4 6]:\n");
    mergeVerbose(a, m, b, n, merged);

    printf("Merged: ");
    for (int i = 0; i < m + n; i++) printf("%d ", merged[i]);
    printf("\nMedian: %.2f\n", (double)merged[3]);
    return 0;
}
                                

Running this shows each merge decision. You'll see that when a[i] <= b[j], we pick from a; otherwise from b. When one array runs out, the remaining elements of the other are copied in order. The trace makes it obvious why the merge is O(m+n) — one comparison per output element.

Program Output

Odd combined length:

How many elements in array A? 4
Enter 4 integers (sorted ascending): 1 3 5 7
How many elements in array B? 3
Enter 3 integers (sorted ascending): 2 4 6
Median: 4.00
                                

Total length 7 (odd). The merged array is [1, 2, 3, 4, 5, 6, 7]; the middle element is at index 3, value 4. Median = 4.

Even combined length:

How many elements in array A? 3
Enter 3 integers (sorted ascending): 1 3 5
How many elements in array B? 3
Enter 3 integers (sorted ascending): 2 4 6
Median: 3.50
                                

Total length 6 (even). The merged array is [1, 2, 3, 4, 5, 6]; the two middle elements are at indices 2 and 3, values 3 and 4. Median = (3 + 4) / 2 = 3.5.

All elements in one array:

How many elements in array A? 5
Enter 5 integers (sorted ascending): 10 20 30 40 50
How many elements in array B? 0
Enter 0 integers (sorted ascending):
Median: 30.00
                                

When one array is empty, the median is just the median of the other. 5 elements → median at index 2, value 30. Correct.

With negative numbers:

How many elements in array A? 3
Enter 3 integers (sorted ascending): -10 -5 0
How many elements in array B? 3
Enter 3 integers (sorted ascending): 5 10 15
Median: 2.50
                                

Merged: [-10, -5, 0, 5, 10, 15]. Two middle elements: 0 and 5. Median = 2.5. The merge correctly handles negative numbers because it only compares values — no assumptions about signs.

And the verbose trace:

Merging [1 3 5 7] and [2 4 6]:
  pick a[0]=1 (a[i]=1 <= b[j]=2)
  pick b[0]=2 (b[j]=2 < a[i]=3)
  pick a[1]=3 (a[i]=3 <= b[j]=4)
  pick b[1]=4 (b[j]=4 < a[i]=5)
  pick a[2]=5 (a[i]=5 <= b[j]=6)
  pick b[2]=6 (b[j]=6 < a[i]=7)
  copy remaining a[3]=7
Merged: 1 2 3 4 5 6 7
Median: 4.00
                                

The trace shows the merge perfectly: at each step, pick from the array whose current head is smaller. When one array is exhausted, copy the rest. Seven output elements, six comparisons and one copy — exactly the amount of work you'd expect.

Step-by-Step Explanation

Let's walk through the merge, then the median computation, and finally the tricky parts.

1. The merge loop

while (i < m && j < n) — as long as both arrays have elements left, compare the current heads. If a[i] <= b[j], the smaller head comes from a; take it and advance i. Otherwise take from b and advance j. Append each taken value to the merged array.

The <= (not <) matters for stability — if elements are equal, picking from a first preserves the relative order of equal elements from a. For the median problem, stability doesn't affect the answer (equal values contribute equally to the median), so < would also work.

2. The leftover loops

while (i < m) merged[k++] = a[i++]; — after the main loop, one array is exhausted. The other still has elements, and since it was sorted, they're all in increasing order. Copy them all to the merged array. Same for b. Together, these two loops ensure the merged array is fully populated, no matter which array ran out first.

3. Computing the median

The merged array has total = m + n elements, sorted ascending. If total is odd, the median is at index total / 2 (integer division). For total = 7, that's index 3 — the 4th element, which is the middle. If total is even, the two middle elements are at indices total/2 - 1 and total/2. For total = 6, those are indices 2 and 3 — the 3rd and 4th elements. Average them.

The division / 2.0 (not / 2) is essential. Integer division would give 3.0 instead of 3.5 for our example. Always use 2.0 when computing an average in C — or cast one operand to double.

4. Tracing findMedian([1,3,5,7], 4, [2,4,6], 3)

  1. total = 7. malloc 7 ints.
  2. Merge: 1 (a), 2 (b), 3 (a), 4 (b), 5 (a), 6 (b), 7 (a).
  3. Merged array: [1, 2, 3, 4, 5, 6, 7].
  4. total = 7, odd. Median at index 3 = 4.
  5. Return 4.0. ✓

5. Tracing findMedian([1,3,5], 3, [2,4,6], 3)

  1. total = 6. malloc 6 ints.
  2. Merge: [1, 2, 3, 4, 5, 6].
  3. total = 6, even. Median is (merged[2] + merged[3]) / 2.0 = (3 + 4) / 2.0 = 3.5.
  4. Return 3.5. ✓

6. Why merging is O(m+n)

Each iteration of the main loop advances either i or j by 1. So the main loop runs at most m + n times. The leftover loops each run at most the remaining count of their array, which sums to at most m + n in total across both. So the entire merge is O(m+n) — linear in the total size of the input. There's no way to do better if you actually build the merged array — you have to touch every element at least once.

7. The O(log(min(m,n))) alternative

The fast version doesn't merge — it finds the partition point directly. The key insight: for a sorted combined array of size total, the median divides it into two halves of size half = (total+1)/2 and total - half. If we can find a split of a and b such that:

  • All elements in the left half ≤ all elements in the right half.
  • The left half has exactly half elements.

Then the median is at the boundary of the left and right halves. The binary search finds the split in O(log(min(m,n))) — for a 1000-element and 100,000-element array, that's about 10 iterations vs. 101,000 for the merge. Huge difference. But the boundary conditions (when i = 0 or i = m) make the code tricky, and there are many subtle bugs people introduce in the partition logic.

8. Why sorted input matters

Without sorted input, the median is a different problem — you'd have to sort first, at O((m+n) log(m+n)) cost. The whole point of the problem is that the input is already sorted, so we can do better than naive sorting. The merge step exploits sortedness: we don't need to compare all pairs, just walk forward picking the smaller head each time. This is a common theme in algorithm design — exploit the structure of your input to avoid redundant work.

9. Edge cases

Several cases deserve attention:

  • Both arrays empty: median is undefined. Our program rejects this.
  • One array empty: the median is the median of the other array. The merge handles this — the empty array's loop runs zero times, the other array is copied in full.
  • All elements in a equal to all in b: the merge produces a sorted array with duplicates. The median is well-defined regardless.
  • Negative numbers: the comparison a[i] <= b[j] works correctly — negatives compare fine. No special handling needed.
  • Overflow: the sum merged[mid1] + merged[mid2] could overflow int if both are near INT_MAX. Using long long for the sum, or casting to double before summing, avoids this. Our version uses / 2.0 which casts the sum to double, but the sum itself might already have overflowed. For safety, cast to double before summing: ((double)merged[mid1] + merged[mid2]) / 2.0.

10. Complexity

The merge-based version is O(m+n) time and O(m+n) space (for the merged array). The no-allocation version is O(m+n) time and O(1) space — better for memory-constrained situations. The binary-search version is O(log(min(m,n))) time and O(1) space — the best of all, but harder to write correctly. For typical inputs (m, n in the thousands), the merge version is fast enough; for very large inputs or memory-constrained environments, the O(1) space or O(log) time versions become necessary.

🔍 Try this: implement the O(1)-space version (findMedianNoAlloc). Then try the binary-search version (findMedianFast) — it's much harder, but a great exercise in boundary conditions. Then compare the three on an array pair of size 1000 each: the merge versions will do about 2000 operations, the binary-search version about 10. That's the payoff of the algorithmic insight.

Frequently Asked Questions

1. What's the difference between mean and median?

The mean is the arithmetic average (sum divided by count). The median is the middle value when sorted. They differ significantly for skewed data. For [1, 2, 3, 4, 100], the mean is 22 but the median is 3. The median is robust to outliers — one extreme value doesn't move it much. That's why median is used for income, housing prices, and other skewed distributions. The mean is simpler and has nice algebraic properties (linearity, decomposability), so it's used in statistical theory. Choose based on what question you're answering.

2. Why does the even-length case need an average?

Because there's no single "middle" element — there are two. For [1, 2, 3, 4], both 2 and 3 are "middle" in some sense (two elements below 2, two above 3). The median is defined as the average of these two: (2 + 3) / 2 = 2.5. This convention makes the median a single number, and it generalizes the odd-case definition (for odd n, the single middle is trivially its own average). It's the standard definition, though some contexts use "lower median" (2 in this case) or "upper median" (3) — read the problem statement carefully.

3. Why is the return type double and not int?

Because for even-length combined arrays, the median is often fractional. [1, 2, 3, 4] has median 2.5 — an int return would truncate it to 2. Using double preserves the fractional part. If you know for certain your inputs will produce an integer median, you could return int, but that's a fragile assumption — better to return double and let the caller decide how to display it. This is a general principle: return the type that can represent all possible results, not just the common case.

4. What's the difference between this and the "hard" version on LeetCode?

LeetCode #4 ("Median of Two Sorted Arrays") asks for O(log(min(m,n))) time. Our merge-based solution is O(m+n) — correct but asymptotically slower. For small arrays (the LeetCode test cases are often small), both pass. But for large arrays (millions of elements), the O(log) version is dramatically faster — billions of operations vs. a few dozen. The hard version uses binary search on the partition point, exploiting the sortedness in a cleverer way than the merge. It's a real algorithmic insight, not just a coding exercise.

5. Can I use this approach for unsorted arrays?

You can, but you'd need to sort first. Sort each array separately (O(m log m + n log n)), then merge (O(m+n)), then find the median. Total O((m+n) log(m+n)). Or merge-unsorted first and sort the combined array — same complexity. For unsorted input, this is the best simple approach. There are more sophisticated algorithms (e.g., quickselect on the combined array) that can find the median in O(m+n) expected time without sorting, but they're harder to implement. For most purposes, sorting is fine.

6. How do I handle integer overflow in the average?

If both middle elements are near INT_MAX, their sum can overflow before the division. For example, (2000000000 + 2000000000) in int arithmetic overflows to a negative number. The fix is to cast to double before summing: ((double)merged[mid1] + merged[mid2]) / 2.0. Or use long long for the intermediate sum. This is a subtle bug that appears only with extreme inputs, but it's real — always worth guarding against when dealing with potentially large values.

💡 Tip: Once this works, try the binary-search version (findMedianFast) — it's one of the most instructive hard problems in the standard interview circuit. Then try "median of a stream" — a related problem where elements arrive one at a time, and you need to maintain the median efficiently. That requires two heaps (a max-heap for the lower half, a min-heap for the upper half). Different problem, same underlying concept of "middle value" — and a great exercise in choosing the right data structure for the job.

📖 Related Tutorials

  • Introduction to Functions in C
  • One Dimensional Arrays
  • Passing Arrays to Functions
  • Function Definition
  • Function Declaration
  • Previous: Find the Longest Increasing Subsequence
  • Next: Find the Majority Element in an Array
  • All 33 Function Assignments

Previous Topic: -->> 29. Find the Longest Increasing Subsequence Using a Function   ||   Next Topic: -->> 31. Find the Majority Element in an Array Using a Function


C Language

  • Home
  • Why C Language
  • History of C Language
  • Applications of C Language
  • Introduction To C
    • What is Program?
    • Structure of C Program
    • Working Of C Program
    • CHARACTER SET
    • VARIABLES AND IDENTIFIERS
    • BUILT-IN DATA TYPES
    • OPERATORS AND EXPRESSIONS
    • CONSTANTS AND LITERALS
    • SIMPLE ASSIGNMENT STATEMENT
    • BASIC INPUT/OUTPUT STATEMENT
    • SIMPLE 'C' PROGRAMS
    • Assignments
  • Operators in C Programming
    • Arithmetic Operators
    • Assignment Operators
    • Increment and Decrement Operators
    • Relational Operators
    • Logical Operators
    • Bitwise Operators
    • Other Operators
    • Assignments
  • CONDITIONAL STATEMENTS
    • DECISION MAKING WITHIN A PROGRAM
    • CONDITIONS
    • IF STATEMENT
    • IF-ELSE STATEMENT
    • IF-ELSE LADDER
    • NESTED IF-ELSE
    • SWITCH CASE
    • Assignments
  • LOOPS STATEMENTS
    • Introduction to Loops
    • GO TO Statement
    • Do while Loop
    • While Loop
    • Nested While Loop
    • Difference Between While and Do while
    • Difference Between Goto and loop
    • while loop assignments
    • C FOR Loop
    • C For loop examples
    • Nested for loop
    • Nested for loop examples
    • Infinite while Loops
    • Infinite for Loops
    • Continue in Loops
    • break in Loops
    • difference while do..while & for
    • Assignments
  • Arrays
    • One Dimensional Array
    • Declaring 1D Arrays
    • Initilization of 1D arrays
    • Accessing element of one 1D Array
    • Read and Display 1D Arrays
    • Two Dimensional Arrays
    • Declare 2D Arrays
    • Read and Display 2D Arrays
    • Assignments/Examples
  • Functions
    • Introduction
    • Need For User-Defined Function
    • Multiple Function Program
    • Modular Programming
    • Elements Of User Defined Function
    • Function Definition
    • Function Declaration
    • Types of functions
    • Nesting of Function
    • Recursion
    • Passing Array To Functions
    • Scope,Visibility and Lifetime of Variables
    • Assignments
  • Structure
    • Introduction
    • Array vs Structure
    • Defining Structure
    • Declaring Structure Variables
    • Type Defined Structure
    • Accessing Structure Members
    • Structure Initilization
    • Copying & Comparing Structure Variables
    • Array of Structure
    • Arrays Within Structure
    • Structures Within Structures
    • Structures and Functions
    • Structure Examples/Assignments
  • Union
    • Define Union
    • Create and use Union
    • Difference Between Structure and Union
    • Union Examples
    • Union FAQ
  • Pointers
    • What Are Pointers In C?
    • How Do We Use Pointers In C?
    • Declaration Of A Pointer
    • The Initialization Of A Pointer
    • Syntax Of Pointer Initialization
    • Use Of Pointers In C
    • The Pointer To An Array
    • The Pointer To A Function
    • The Pointer To A Structure
    • Types Of Pointers
    • The Null Pointer
    • The Void Pointer
    • The Wild Pointer
    • The Near Pointer
    • The Huge Pointer
    • The far Pointer
    • dangling pointer
    • Accessing Pointers- Indirectly And Directly
    • Pros Of Using Pointers In C
    • Cons Of Pointers In C
    • Applications Of Pointers In C
    • The & Address Of Operator In C
    • How To Read The Complex Pointers In C?
    • Practice Problems On Pointers
  • File Processiong
    • File Handling In C
    • Types Of Files In C
    • Operations Done In File Handling
    • File Examples
    • Binary Files
    • count words,lines in a file
    • Copy files
    • Update File
    • count vowels in a file
  • Preprocessor
    • Macro substitution division
    • File Inclusion
    • Conditional Compilation
    • Other directives
    • Examples
  • Dynamic Memory Allocation
    • malloc
    • calloc
    • free
    • realloc
    • Examples
  • Storage Classes
  • Graphics
  • Frequently Asked Interview Questions (FAQ)
    • Introduction To C FAQ
    • Operators FAQ
    • Conditional Statements FAQ
    • Loops FAQ
    • Arrays FAQ
    • Function FAQ
    • Structure FAQ
    • Pointers FAQ
    • Files FAQ
    • Storage classes FAQ
    • Dynamic Memory FAQ
  • Programs/Assignments
    • Introduction To C
    • Operators
    • Conditional Statements
    • Loops
    • Arrays
    • Function
    • Structure
    • Pointers
    • Files
    • Storage classes
    • Dynamic Memory
  • Case Studies
  • Multiple Choice Questions
    • Introduction To C MCQ
    • Operators MCQ
    • Conditional Statements MCQ
    • Loops MCQ
    • Arrays MCQ
    • Function MCQ
    • Structure MCQ
    • Pointers MCQ
    • Files MCQ
    • Storage classes MCQ
    • Dynamic Memory MCQ
    • More MCQ

Get in touch

  • tech2dsm@gmail.com

© Sankalan Data Tech. All rights reserved.