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

What is the purpose of void in c?

0 Answers  


What is the value of c?

0 Answers  


Explain bitwise shift operators?

0 Answers  


Explain how can I read and write comma-delimited text?

0 Answers  


Write a function expand(s1,s2) that expands shorthand notations like a-z in the string s1 into the equivalent complete list abc...xyz in s2 . Allow for letters of either case and digits, and be prepared to handle cases like a-b-c and a-z0-9 and -a-z. z-a:zyx......ba -1-6-:-123456- 1-9-1:123456789987654321 a-R-L:a-R...L a-b-c:abbc

0 Answers  






How to get string length of given string in c?

0 Answers  


WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.

0 Answers   Google, Infosys,


write a programme to convert temperature from farenheit to celcius?

4 Answers   IBM,


pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)

0 Answers   Subex,


Hai why 'c' is the middle language

4 Answers  


write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.

0 Answers  


Expand the following LKB BKL FFG

0 Answers  


Categories