83. Structures-ii

Question.6

A developer uses nested structs for a GPS module:

typedef struct {
   float lat;
   float lon;
} Coordinate;

typedef struct {
   uint8_t fix_type;
   Coordinate pos;
   uint16_t altitude;
} GPS_Data;

GPS_Data gps = {3, {28.6139f, 77.2090f}, 250};
printf("%d", gps.pos.lat > 0 ? 1 : 0);

What is the output?

Need Help? Refer to the Quick Guide below

Select Answer

Restart quiz!