-
What will be the output of the code snippet given below?
#include <studio.h>
int main ()
{
struct book
{
char bookname[20];
int totalpages;
float price;
};
struct book b = {0};
printf(("%d%f\n", b.totalpages, b.price);
return 0;
}
-
- 0 0.000000
- Garbage values
- Erroe
- None of the above
Correct Option: A
When an automatic structure is partially initialised, the remaining elements of the structure are initialised to 0.