Figure Q2c (shaded area) shows the output screen of the C program in Listing Q2c. Write
the format control string of each printf() functions in the given C program for obtaining the
outputs of Line 2 - Line 6.
Line 1 E C E 4 1 1
Line 2 T E S T 1
Line 3 T i m e : 0 8 3 0
Line 4 D u r a t i o n :
Line 5 " B E P U N C T U A L 2 h r s
Figure Q2c
#include <stdio.h>
int main()
{
char a[] = "ECE411";
char b[] = "TEST1";
char c[] = "Time:";
char d[] = "Duration: (in hours)";
char e[] = "BE PUNCTUAL";
int f = 830;
printf("%s\n",a);
printf("\n",b);
printf("\n",c,f);
printf("\n",d);
printf("\n",2," hrs");
printf("\n",e);
return 0;
}
Listing Q2c