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);

}

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the ternary tree?

604


What is the heap?

688


What is property type c?

606


What is the use of linkage in c language?

618


how to execute a program using if else condition and the output should enter number and the number is odd only...

1660






What is the value of c?

575


Write a c program to build a heap method using Pointer to function and pointer to structure ?

4180


What is string length in c?

615


Hi can anyone tell what is a start up code?

1617


What is calloc malloc realloc in c?

595


What is the advantage of an array over individual variables?

745


What are pointers? What are stacks and queues?

582


If I have a char * variable pointing to the name of a function ..

655


Write a program to reverse a given number in c?

602


What is a ternary operator in c?

655