C-Programming-data-structure || 2021 SET 1 || MCQ || 1-mark || Module 1: C Programming1

Last Updated :
Discuss
Comments

Consider the following ANSI C program.

#include <stdio.h>

int main()

{

    int i, j, count;

    count = 0;

i = 0;

    for (j = –3, j <= 3; j++)

    {

          if ((j >= 0) && (i++))

                count = count + j;

    }

    count = count + i;

printf(“%d”, count);

    return 0;

}

Which of one of the following options is correct? 2021 SET 1 || MCQ || 1-mark


The program will compile successfully and output 10 when executed.

The program will not compile successfully.


The program will compile successfully and output 8 when executed.

The program will compile successfully and output 13 when executed.

Share your thoughts in the comments
Article Tags :