What is the output of the following C program? #include <stdio.h> int…

PYQ UGC NET 2023

What is the output of the following C program?

#include <stdio.h>

int main(void)
{
   static float a[] = {13.24, 1.5, 4.5, 5.4, 3.5};
   float *j;
   float *k;

   j = a;
   k = a + 4;

   j = j * 2;
   k = k / 2;

   printf("%f %f", *j, *k);

   return 0;
}

  1. A.

    13.25, 4.5

  2. B.

    1.5, 3.5

  3. C.

    13.24, 1.5, 4.5, 5.4, 3.5

  4. D.

    Illegal use of pointer in main function

Attempted by 488 students.

Sign up free to check your answer

Sign up free

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…