LogiQuest
Back to Control Instructions
7

What will be the output of the program?

#include <stdio.h>

int main(void) {
    int i, j, c = 0;
    for (i = 0; i < 3; i++)
        for (j = i; j < 3; j++)
            c++;
    printf("%d\n", c);
    return 0;
}
Medium

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.