Can someone help with the below
#include <stdio.h>
main ()
{
char receive_buff [] ={0x01,0x00,0x01,0x01,0x00,0x00};
switch( receive_buff[0] )
{
case 0x00:
{printf("\nswitch 00\n");}
case 0x01:
{printf("\nswitch 01\n");}
case 0x02:
{printf("\nswitch 02\n");}
default :
{printf("\nswitch default\n");}
}
}
the result is
./a.out
switch 01
Ro
switch 02
switch default
I don't know what going on here.
main ()should beint main(void)Ro?