#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

struct test_s
{
    float  val ;
    int bol ;

} ;

#define LEN 5

struct test_s mystr[LEN] ;

int main( void )
{
    for( int i = 0 ; i < LEN ; i += 1 )
    {
        mystr[i].val = 321.0f ; 
        mystr[i].bol = 1 ;
    }

    for( int i = 0 ; i < LEN ; i += 1 )
        printf( "\n %f   %d" , mystr[i].val , mystr[i].bol ) ;

    for( int i = 0 ; i < LEN ; i += 1 )
        mystr[i].val = 0.0f ;   //set only val to 0

    for( int i = 0 ; i < LEN ; i += 1 )
        printf( "\n %f   %d" , mystr[i].val , mystr[i].bol ) ;  //both values get printed as 0, WRONG!

    return 0;
}