Function Assignment 32 β€” Find the Maximum Product Subarray Using a Function
  • Twitter
  • Facebook
  • Snapchat
  • Instagram

C Program: Find the Maximum Product Subarray Using a Function

πŸ“‘ On this page:
  • Why this is harder than max-sum subarray
  • Tracking max and min β€” the key insight
  • Complete C Program
  • Program Output
  • Step-by-Step Explanation
  • Frequently Asked Questions
πŸ“š In this program, you will learn:
  • Why the product version can't be solved with just one tracking variable
  • Why a large negative product can become a large positive one after multiplication
  • How to track both max and min in a single pass
  • Why initializing to arr[0] (not 0 or 1) handles all-negative arrays correctly
  • Why using long long is essential β€” products grow fast

Why this is harder than max-sum subarray

The maximum product subarray problem looks just like the maximum sum subarray (Kadane's algorithm), except with multiplication instead of addition. For sums, Kadane's algorithm works because adding a negative number makes the sum smaller, so a negative prefix is never worth keeping β€” you can safely reset to 0. But for products, multiplication is very different: a large negative product multiplied by another negative number becomes a large positive product. So a run of negatives can "turn around" and produce the maximum product.

Consider [2, -3, 4, -1, 5]. If you only tracked the maximum product ending at each position, you'd take the max at each step: 2, -3, 4, -4, 5 β†’ the best would be 5. But the real answer is 120, from the subarray [2, -3, 4, -1, 5] β€” the entire array. The product is 2 Γ— (-3) Γ— 4 Γ— (-1) Γ— 5 = 120. To see this, you have to track the minimum product ending at each position too, because the "most negative" prefix can become the "most positive" after the next multiplication by a negative number.

This is the key difference: for products, you need two tracking variables β€” max and min β€” instead of one. The max product ending at index i is the maximum of three candidates: arr[i] alone, maxProd Γ— arr[i], or minProd Γ— arr[i]. The min product is the minimum of those three. By tracking both, you correctly handle the sign flips that multiplication introduces.

The algorithm is still O(n) time and O(1) space β€” the two-tracking-variables trick doesn't increase asymptotic complexity. It's a beautiful example of how a small change to the problem (sum β†’ product) requires a small but crucial change to the algorithm (one variable β†’ two variables). Once you've written both, you've internalized a valuable lesson about how DP state must match the structure of the problem.

πŸ’‘ In one line: track maxProd and minProd ending at each index. Each step, compute three candidates β€” arr[i], maxProd Γ— arr[i], minProd Γ— arr[i] β€” and set new max and min to the max and min of those three. Track the global best.

An array with two negative numbers bracketing positive ones β€” the subarray from the first negative to the second has a positive product.

Tracking max and min β€” the key insight

Here's the algorithm:

maxProd = arr[0]
minProd = arr[0]
best = arr[0]

for i = 1 to n-1:
    tempMax = maxProd * arr[i]
    tempMin = minProd * arr[i]

    maxProd = max(arr[i], tempMax, tempMin)
    minProd = min(arr[i], tempMax, tempMin)

    best = max(best, maxProd)

return best
                                

Two tracking variables, three candidates per iteration. The three candidates are important: they represent the three ways the product ending at i can be formed β€” start fresh at arr[i], extend the max-ending-at-i-1, or extend the min-ending-at-i-1. Because multiplying by a negative flips the sign, the min-ending-at-i-1 can become the max-ending-at-i.

A subtle bug: you must save maxProd and minProd before updating them. If you write maxProd = max(maxProd * arr[i], minProd * arr[i], arr[i]) and then minProd = min(maxProd * arr[i], minProd * arr[i], arr[i]), the second line uses the already-updated maxProd β€” a bug. The temp variables avoid this.

Let's trace it for [2, -3, 4, -1, 5]:

i arr[i] maxProd minProd best Reason
02222Initial values
1-3-3-62max(-3, -6, 6) = -3; min(-3, -6, 6) = -6
244-244max(4, -12, -24) = 4; min = -24
3-124-424max(-1, -4, 24) = 24; min(-1, -4, 24) = -4
45120-20120max(5, 120, -20) = 120; min(5, 120, -20) = -20

The maximum product is 120, achieved by the full subarray [2, -3, 4, -1, 5]. Notice how the min product drops to -24 at i=2, then becomes 24 at i=3 when multiplied by -1. That's the sign flip in action β€” the "worst" prefix became the "best" prefix in one step.

🎯 Key insight: a large negative product multiplied by another negative becomes a large positive. So tracking only the maximum isn't enough β€” you have to track the minimum too, because it might become the maximum at the next step. This is the product-version insight that makes the algorithm work.

Complete C Program

Program: find the maximum product subarray

#include <stdio.h>

/* Function prototype */
long long maxProduct(const int arr[], int n);

int main(void) {
    int arr[100];
    int n;

    printf("How many elements? ");
    if (scanf("%d", &n) != 1 || n <= 0 || n > 100) {
        printf("Please enter a valid count between 1 and 100.\n");
        return 1;
    }

    printf("Enter %d integers: ", n);
    for (int i = 0; i < n; i++) {
        if (scanf("%d", &arr[i]) != 1) return 1;
    }

    printf("Maximum product subarray: %lld\n", maxProduct(arr, n));

    return 0;
}

/* Track both max and min products ending at each position */
long long maxProduct(const int arr[], int n) {
    long long maxProd = arr[0];
    long long minProd = arr[0];
    long long best = arr[0];

    for (int i = 1; i < n; i++) {
        long long a = (long long)arr[i];
        long long cand1 = a;
        long long cand2 = maxProd * a;
        long long cand3 = minProd * a;

        long long newMax = cand1;
        long long newMin = cand1;
        if (cand2 > newMax) newMax = cand2;
        if (cand3 > newMax) newMax = cand3;
        if (cand2 < newMin) newMin = cand2;
        if (cand3 < newMin) newMin = cand3;

        maxProd = newMax;
        minProd = newMin;

        if (maxProd > best) best = maxProd;
    }

    return best;
}
                                    

And a version that reports the actual subarray bounds β€” the sum of the values is one thing, but knowing which indices are involved is often what you really want:

Variant: report start and end indices

#include <stdio.h>

long long maxProductWithBounds(const int arr[], int n,
                               int *outStart, int *outEnd) {
    long long maxProd = arr[0], minProd = arr[0], best = arr[0];
    int maxStart = 0, minStart = 0;
    int bestStart = 0, bestEnd = 0;

    for (int i = 1; i < n; i++) {
        long long a = arr[i];
        long long newMaxProd, newMinProd;
        int newMaxStart, newMinStart;

        /* Three candidates for max */
        if (maxProd * a >= minProd * a && maxProd * a >= a) {
            newMaxProd = maxProd * a;
            newMaxStart = maxStart;
        } else if (minProd * a >= a) {
            newMaxProd = minProd * a;
            newMaxStart = minStart;
        } else {
            newMaxProd = a;
            newMaxStart = i;
        }

        /* Three candidates for min */
        if (maxProd * a <= minProd * a && maxProd * a <= a) {
            newMinProd = maxProd * a;
            newMinStart = maxStart;
        } else if (minProd * a <= a) {
            newMinProd = minProd * a;
            newMinStart = minStart;
        } else {
            newMinProd = a;
            newMinStart = i;
        }

        maxProd = newMaxProd;
        minProd = newMinProd;
        maxStart = newMaxStart;
        minStart = newMinStart;

        if (maxProd > best) {
            best = maxProd;
            bestStart = maxStart;
            bestEnd = i;
        }
    }

    *outStart = bestStart;
    *outEnd = bestEnd;
    return best;
}

int main(void) {
    int arr[] = {2, -3, 4, -1, 5};
    int n = sizeof(arr) / sizeof(arr[0]);
    int s, e;
    long long prod = maxProductWithBounds(arr, n, &s, &e);
    printf("Max product: %lld\n", prod);
    printf("Subarray [%d..%d]: ", s, e);
    for (int i = s; i <= e; i++) printf("%d ", arr[i]);
    printf("\n");
    return 0;
}
                                

The bookkeeping for start indices adds significant complexity. Each of the three candidates for max and min has its own associated start index, so you track maxStart and minStart in parallel with maxProd and minProd. The logic is mechanical but tedious β€” for a first pass, the sum-only version is easier to understand, and this variant is worth revisiting once you're comfortable with the base algorithm.

And a version that shows each step, useful for understanding:

Variant: verbose trace

#include <stdio.h>

long long maxProductVerbose(const int arr[], int n) {
    long long maxProd = arr[0], minProd = arr[0], best = arr[0];
    printf("i=0, arr[0]=%d: maxProd=%lld, minProd=%lld, best=%lld\n",
           arr[0], maxProd, minProd, best);

    for (int i = 1; i < n; i++) {
        long long a = arr[i];
        long long c1 = a;
        long long c2 = maxProd * a;
        long long c3 = minProd * a;

        long long newMax = c1, newMin = c1;
        if (c2 > newMax) newMax = c2;
        if (c3 > newMax) newMax = c3;
        if (c2 < newMin) newMin = c2;
        if (c3 < newMin) newMin = c3;

        maxProd = newMax;
        minProd = newMin;
        if (maxProd > best) best = maxProd;

        printf("i=%d, arr[i]=%d: candidates={%lld, %lld, %lld}, maxProd=%lld, minProd=%lld, best=%lld\n",
               i, arr[i], c1, c2, c3, maxProd, minProd, best);
    }
    return best;
}

int main(void) {
    int arr[] = {2, -3, 4, -1, 5};
    int n = 5;
    printf("Final answer: %lld\n", maxProductVerbose(arr, n));
    return 0;
}
                                

The verbose version prints every step β€” the three candidates, the new max and min, and the running best. It's not code you'd ship, but it's an excellent teaching tool. Run it, and you can see the sign flip when the min product becomes the max on the second negative number.

Program Output

A typical run with the example array:

How many elements? 5
Enter 5 integers: 2 -3 4 -1 5
Maximum product subarray: 120
                                

The product of the entire array is 120 β€” the maximum. This is the case where tracking only the max would have missed it, because at i=3, the max was 4 but the min was -24, and multiplying -24 by -1 gives 24, which becomes the new best.

With all positive numbers:

How many elements? 4
Enter 4 integers: 1 2 3 4
Maximum product subarray: 24
                                

When everything is positive, the maximum product is the entire array. The algorithm handles this naturally: maxProd keeps growing, and best tracks it.

With all negative numbers:

How many elements? 4
Enter 4 integers: -2 -3 -4 -5
Maximum product subarray: 120
                                

All negatives, but the product of all four is 120 (positive) β€” (-2) Γ— (-3) Γ— (-4) Γ— (-5) = 120. The algorithm correctly finds this. Without tracking the minimum, it would have failed: the running product would start at -2, then become 6, then -24, then 120 β€” but only if you keep multiplying through. The min variable catches the -24, and the next multiplication gives 120.

With zeros:

How many elements? 5
Enter 5 integers: 0 2 3 0 4
Maximum product subarray: 6
                                

Zeros break any product to 0, so the maximum subarray is between two zeros: [2, 3] with product 6. The algorithm handles this: when arr[i] = 0, the product resets to 0, and the next positive number starts fresh. The maximum across the whole array is 6.

A single element:

How many elements? 1
Enter 1 integers: -7
Maximum product subarray: -7
                                

With a single negative element, the answer is that element itself β€” a subarray of length 1. The loop doesn't run, and the function returns arr[0]. This is why initializing to arr[0] is critical β€” starting with 1 or 0 would give the wrong answer.

And the verbose trace on the first example:

i=0, arr[0]=2: maxProd=2, minProd=2, best=2
i=1, arr[i]=-3: candidates={-3, -6, 6}, maxProd=-3, minProd=-6, best=2
i=2, arr[i]=4: candidates={4, -12, -24}, maxProd=4, minProd=-24, best=4
i=3, arr[i]=-1: candidates={-1, -4, 24}, maxProd=24, minProd=-4, best=24
i=4, arr[i]=5: candidates={5, 120, -20}, maxProd=120, minProd=-20, best=120
Final answer: 120
                                

The trace is the clearest illustration of why two variables are needed. At i=2, minProd becomes -24. At i=3, the candidate minProd Γ— arr[3] = -24 Γ— -1 = 24 becomes the new max β€” that's the sign flip. Without the min tracking, we'd have missed it.

Step-by-Step Explanation

Let's understand the algorithm, then walk through the code.

1. Why Kadane's algorithm doesn't directly apply

For sums, a negative prefix is always bad β€” you should reset. For products, a negative prefix can become excellent after another negative. So the "reset when negative" rule doesn't work. You have to keep both the max and the min ending at each position, because the sign can flip at any step.

2. The recurrence

maxProd ending at i is the maximum of three values:

  • arr[i] alone β€” start fresh.
  • maxProd(i-1) Γ— arr[i] β€” extend the max-ending-at-i-1.
  • minProd(i-1) Γ— arr[i] β€” extend the min-ending-at-i-1 (if it's very negative and arr[i] is negative, this product is large positive).

Similarly for minProd, but with min instead of max. The three-candidate structure is the essence of the algorithm.

3. Why the temp variables are essential

Notice that maxProd is computed from the old maxProd and old minProd, and minProd is also computed from the old maxProd and old minProd. If you updated maxProd first and then computed minProd using the new maxProd, you'd get the wrong answer. The temp variables (cand1, cand2, cand3) capture the three candidate values before any update, then we set new maxProd and minProd from those. This avoids the order-dependence bug.

4. Tracing [2, -3, 4, -1, 5]

Already traced in the table above. Key moments:

  • i=2 (arr=4): minProd drops to -24, because minProd(-6) Γ— 4 = -24.
  • i=3 (arr=-1): the candidate from minProd is -24 Γ— -1 = 24, which becomes the new max.
  • i=4 (arr=5): 24 Γ— 5 = 120, the final answer.

The sign flip at i=3 is the key β€” the whole algorithm hinges on this possibility.

5. Edge cases

Several cases deserve attention:

  • All negative: the answer depends on the parity of the count. If even, the product of all is positive (the max). If odd, the answer is the product of all except the one with smallest absolute value. Our algorithm handles both via the min-tracking.
  • All positive: the answer is the product of the entire array. maxProd grows monotonically, and best tracks it.
  • Contains zeros: zeros break the product into independent segments. The algorithm handles this β€” at a zero, both maxProd and minProd become 0, and the next element starts fresh.
  • Single element: the loop doesn't run, and the function returns arr[0]. Correct, because the only subarray is the single element.

6. Why initialize to arr[0]

Initializing to 0 or 1 would break the all-negative case. For [-2, -3, -4], starting with 0 would give maxProd = 0 Γ— -2 = 0, which is wrong β€” the actual max is 12 (from [-2, -3, -4], since -2 Γ— -3 = 6 and 6 Γ— -4 = -24, but [-2, -3] = 6 is the best... wait, -2 Γ— -3 = 6, and -3 Γ— -4 = 12, so the best is 12). Starting from arr[0] gives the right answer via the min/max tracking. Starting from 0 gives 0, which is wrong. Starting from 1 gives 1, also wrong. So starting from arr[0] is essential.

7. Overflow

Products grow very fast. For n=10 with values around 100, the product can be 100¹⁰ = 10²⁰, far exceeding long long's maximum of about 9.2 Γ— 10¹⁸. For 20 elements, even long long overflows. So the algorithm is correct in principle but can produce wrong results due to overflow for large inputs. For competitive programming problems, the constraints often avoid this (small values, small n), or the problem asks for the answer modulo some prime. For a general-purpose solution, you'd need bignum arithmetic or careful overflow handling.

8. Complexity

O(n) time β€” one pass through the array, three comparisons per iteration (for the max) plus three more (for the min). O(1) space β€” a handful of variables. Optimal. Compare with the naive O(nΒ²) approach (check every subarray's product) β€” 100Γ— slower for n=100, 10,000Γ— slower for n=10,000. The optimization is significant, and it's a direct application of the DP insight.

9. Comparison with max-sum subarray

Side-by-side, the two algorithms highlight the difference:

  • Max sum: track max only. Update: current = max(arr[i], current + arr[i]). Because addition doesn't flip signs.
  • Max product: track max AND min. Update: max = max(arr[i], maxΓ—arr[i], minΓ—arr[i]); min = min(arr[i], maxΓ—arr[i], minΓ—arr[i]). Because multiplication can flip signs.

This is a lesson about how problem structure dictates algorithm structure. Sums are additive; products are multiplicative. The DP state must reflect the properties of the operation being applied. Once you see this distinction, you'll design better algorithms for a whole class of problems.

10. Relation to other product problems

The same two-variable trick applies to related problems: minimum product subarray (symmetric, just track both and return min), product of all but one element (prefix/suffix products), and product subarrays with specific conditions. The core insight β€” that negative factors can create large positive products β€” is the same. Once you've internalized it, you can adapt to variations quickly.

πŸ” Try this: write the minimum product subarray variant. It's the same code with the comparisons flipped at the end β€” you're looking for the smallest (most negative) product. Then try a version that finds both min and max product subarrays in one pass. Then try the variant that finds all subarrays with product equal to a given target β€” that's a harder problem (sliding window with a hash map), but it's built on the same base concept of tracking cumulative products.

Frequently Asked Questions

1. Why do we need to track both max and min?

Because multiplying a very negative number by another negative gives a very positive result. If we only tracked the maximum, we'd miss cases where the "worst" prefix becomes the "best" after the next multiplication. For example, in [2, -3, 4, -1, 5], the running product goes: 2, -6, -24, 24, 120. The 24 comes from multiplying the -24 (minimum) by -1 β€” if we only tracked the maximum, we'd never have known about -24, and we'd miss 24. So the max alone is insufficient.

2. Why must the temp variables be used before updating max/min?

Because the new max and new min both depend on the OLD max and OLD min. If you wrote maxProd = max(arr[i], maxProd * arr[i], minProd * arr[i]) first, then minProd = min(arr[i], maxProd * arr[i], minProd * arr[i]), the second line would use the already-updated maxProd β€” giving the wrong answer. The temp variables (cand1, cand2, cand3) capture all three candidates before any update, so the subsequent assignments use the correct old values. This is a common source of subtle bugs in DP updates.

3. What's the maximum product for an all-negative array?

Depends on the count of negatives. If even (including 0), the product of all elements is positive β€” the maximum. If odd, the maximum is the product of all elements divided by the element with the largest absolute value (which is the one we want to exclude). For example, [-2, -3, -4] (three negatives): the product of all is -24, so the max is (-2) Γ— (-3) = 6. Our algorithm finds this β€” maxProd at each step is: -2, 6, -24, but the best tracks 6 at i=1, and later values don't beat it.

4. How do I handle zeros in the array?

Zeros are handled naturally by the algorithm. When arr[i] = 0, the new max and min both become 0 (since one of the candidates is 0). This effectively resets the running products, which is correct β€” any product including a zero is 0, so the best subarray can't span across a zero. The algorithm correctly finds the max within each nonzero segment. If all elements are zero, the max product is 0. If some are zero and others aren't, the max is in the largest nonzero segment.

5. Why long long and not int?

Because products grow extremely fast. Even with 10 elements of value 100, the product is 100¹⁰ = 10²⁰, which overflows a 32-bit int (max ~2.1 Γ— 10⁹). long long extends the range to about 9.2 Γ— 10¹⁸, which is enough for many cases but still not all. For very large arrays or large values, you'd need arbitrary-precision arithmetic (or the problem would specify a modulus). Always use long long when computing products β€” overflow bugs are silent and hard to debug.

6. Can I find the maximum product subarray in O(n) space instead of O(1)?

Yes β€” you could compute all prefix products and use a hash map, or run the two-variable algorithm but store intermediate results. But there's no reason to β€” the O(1) space version is optimal and just as fast. The only case where you'd want O(n) space is if you also want to reconstruct the subarray (which needs start/end indices) or do additional analysis. For the plain "find the maximum product" problem, the two-variable version is the right answer.

πŸ’‘ Tip: Once this works, try the "maximum product of three numbers" problem β€” find the max product of any three elements in the array. The trick is that the answer is either the product of the three largest, or the product of the two smallest (which might be negative) times the largest. Same "track multiple candidates" mindset. Then try "product of array except self" β€” compute the product of all elements except the current one, in O(n) without division. These three problems form a nice triad of "product manipulation" exercises, and each teaches a different technique.

πŸ“– Related Tutorials

  • Introduction to Functions in C
  • One Dimensional Arrays
  • Passing Arrays to Functions
  • Function Definition
  • Function Declaration
  • Related: Find the Largest Sum Subarray (Kadane's)
  • Previous: Find the Majority Element
  • Next: Find the Contiguous Subarray with the Largest Sum (Kadane's)
  • All 33 Function Assignments

Previous Topic: -->> 31. Find the Majority Element in an Array Using a Function   ||   Next Topic: -->> 33. Find the Contiguous Subarray with the Largest Sum (Kadane's)


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.