Top

Discussion

What will be the output of the program?

#include
int main()
{
    int i = 5;
    while(i-- >= 0)
        printf("%d,", i);
    i = 5;
    printf("\n");
    while(i-- >= 0)
        printf("%i,", i);
    while(i-- >= 0)
        printf("%d,", i);
    return 0;
}

 

  • A.4, 3, 2, 1, 0, -1
    4, 3, 2, 1, 0, -1
  • B.5, 4, 3, 2, 1, 0
    5, 4, 3, 2, 1, 0
  • C.Error
  • D.5, 4, 3, 2, 1, 0
    5, 4, 3, 2, 1, 0
    5, 4, 3, 2, 1, 0

Answer: A

No answer description available for this question.
 

No comment is present. Be the first to comment.
Loading…

Post your comment