Question 63

Consider the following C code.
#include <stdio.h>
#include <math.h>
void main()
{

         double pi = 3.1415926535;
         int a = 1;
         int i;

  for(i = 0; i <3; i++)
         if(a = cos(pi * i/2) )
                         printf("%d ",1);
         else printf("%d ", 0);
}
What would the program print?

Create a FREE account and get:

  • Download Maths Shortcuts PDF
  • Get 300+ previous papers with solutions PDF
  • 500+ Online Tests for Free

Book Free CAT Mentorship

Get personalized CAT strategy from a 99%iler

500+ students mentored
CAT mentor

Join CAT 2026 course by 5-Time CAT 100%iler

Crack CAT 2026 & Other Exams with Cracku!

Ask AI