Find the output of the following program: A) char str[20] = "Development"; str[5] = '\0'; int len = strlen(str); printf("%s", str); B) int main() {…

Find the output of the following program:

A)

char str[20] = "Development";
str[5] = '\0';
int len = strlen(str);
printf("%s", str);

B)

int main() {
    int i = 2, j = 2;
    while (i?--i:j++)
    printf("%d",i);
    return 0;
}

From the BREB Assistant Programmer February 2025 – Written exam, question 2 of 10.

More from this paper