closed by
275 views
0 votes
0 votes
closed with the note: Duplicate question
What will be the output of the following C program? If you think it will give a runtime error, you need to mention it. In either case, your answer must include proper justi cations without which no credit will be given.

#include<stdio.h>

main()

{

unsigned char i, j, a[] = {1, 2, 3, 4, 5};

int n; i = j = n = 5;

while(i-- != 0) n += a[i];

while(j++ != 0) n += 2;

printf("i = %d, j = %d, n = %d\n", i, j, n);

while(j-- != 0) a[0] += n;

printf("j = %d, a[0] = %d\n", j, a[0]);

}
closed by

Related questions

0 votes
0 votes
1 answer
2
N asked May 1, 2019
522 views
Consider a max-heap of n distinct integers, n ≥ 4, stored in an array A[1 . . . n]. The second minimum of A is the integer that is less than all integers in A except th...