C Programming :: Structures, Unions, Enums
-
Which of the following statements correct about the below program?
#include
int main() { struct emp { char name[25]; int age; float sal; }; struct emp e[2]; int i=0; for(i=0; i2; i++) scanf("%s %d %f", e[i].name, &e[i].age, &e[i].sal); for(i=0; i2; i++) scanf("%s %d %f", e[i].name, e[i].age, e[i].sal); return 0; } -
Which of the following statements correct about the below program?
#include
1: u2 CANNOT be initialized as shown. 2: u1 can be initialized as shown. 3: To initialize char ch[] of u2 '.' operator should be used. 4: The code causes an error 'Declaration syntax error' -
Which of the following statements correctly assigns 12 to month using pointer variable pdt?
#include
struct date { int day; int month; int year; }; int main() { struct date d; struct date *pdt; pdt = &d; return 0; } -
Which of the following statements correct about the below code?
maruti.engine.bolts=25;