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
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 |
HOW TO HANDLE EXCEPTIONS IN C
Process by which one bit pattern in to another by bit wise operation is?
What is clrscr ()?
What are local and global variables?
What do header files do?
Explain how do you determine the length of a string value that was stored in a variable?
for example user gives input as " 20 or 20.0 or rs 20.0 or 20.00 or rs20 and so .. on " and the output should be stored as " rs.20.00 " in a variable
can we initialize all the members of union?
main() { int a=5; printf(?%d,%d,%d\n?,a,a< <2,a>>2); } Answer: 5,20,1 please explain this code in detail
ratio,age,persentage
Find occurence of a character in a sting.
ATM machine and railway reservation class/object diagram