adplus-dvertising
frame-decoration

Question

What is the output of this program?
#include <stdio.h>
 struct 
{
 int i;
 float ft;
}decl;
int main(){
    decl.i = 4;
 decl.ft = 7.96623;
 printf("%d %.2f", decl.i, decl.ft);
 return 0;
}

a.

4 7.97

b.

4 7.96623

c.

Compilation error

d.

None of the above

Posted under C Programming

Answer: (a).4 7.97

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?