what would be the output of the follwing

struct st
{
char name[20];
int i;
float f;

};
main()
{
struct st emp = {"forum"};
printf("%d %f",emp.i,emp.f);

}

Answers were Sorted based on User's Feedback



what would be the output of the follwing struct st { char name[20]; int i; float f; ..

Answer / maruthi

Answer:0,0

Because if 1 element is initialised in structure or array
the remaining elements are initialised to 0 by default.

Is This Answer Correct ?    8 Yes 2 No

what would be the output of the follwing struct st { char name[20]; int i; float f; ..

Answer / ajay

0 0.000000

Is This Answer Correct ?    5 Yes 0 No

what would be the output of the follwing struct st { char name[20]; int i; float f; ..

Answer / rama krishna sidhartha

0,0.000000

Is This Answer Correct ?    3 Yes 0 No

what would be the output of the follwing struct st { char name[20]; int i; float f; ..

Answer / karthik

0, 0.00

Is This Answer Correct ?    3 Yes 0 No

Post New Answer

More C Interview Questions

How do I declare a pointer to an array?

6 Answers   IBM,


What are multibyte characters?

0 Answers  


void main() { char far *farther,*farthest; printf("%d..%d",sizeof(farther),sizeof(farthest)); }

3 Answers   ME, pspl,


implement NAND gate logic in C code without using any bitwise operatior.

4 Answers   Alcatel,


What is the difference between fread buffer() and fwrite buffer()?

0 Answers  






What is the difference between if else and switchstatement

0 Answers  


What is the difference between functions getch() and getche()?

0 Answers  


Write a program to find the given number is odd or even without using any loops(if,for,do,while)

4 Answers   CNC, Gokul,


how to set Nth bit of a variable?

1 Answers  


What is string concatenation in c?

0 Answers  


Why #include is used in c language?

0 Answers  


Write a C program to multiply tho numbers without using arithmetic operator (+, -, *, /).

1 Answers  


Categories