MIPI_AdvancedC_FRTK/Lect1/22_page_34.c

17 lines
271 B
C
Raw Normal View History

2024-11-14 08:45:50 +03:00
#include <stdio.h>
#include <inttypes.h>
struct s {
int i;
float f;
} st = {10,3.14};
int main(void)
{
struct s *ps;
ps = &st; //указатель на структуру
printf("ps -> i = %d\n",ps->i);
printf("(*ps).i = %d\n",(*ps).i);
return 0;
}