ISRO | ISRO CS 2013 | Question 62
Consider the following C code. What would the program print? Option (C) is correct.
a = cos(pi * 0/2)
a = cos(0) = 1, condition true print 1
Second iteration: i = 1
a = cos (pi/2)
a = 0, so else part would print 0
Third iteration: i = 2
a = cos(pi)
a = -1, since any value other than 0
inside if statement returns true,
Quiz of this Question
What would the program print? Option (C) is correct.
Option (C) is correct.