[Solved] How to use default values in a char array?
memset(&host, 0, sizeof(host)); will fill it with zeroes. 0 solved How to use default values in a char array?
memset(&host, 0, sizeof(host)); will fill it with zeroes. 0 solved How to use default values in a char array?
It’s because when doing: def calc_tax(sales_total,tax_rate=0.04): print(sales_total * tax_rate) You can do: calc_tax(100) Then here tax_rate is an argument that’s assigned to a default value so can change it by: calc_tax(any thing here,any thing here) OR: calc_tax(any thing here,tax_rate=any thing here) So in the other-hand, this code: def calc_tax(sales_total): print(sales_total*0.04) Is is only able to … Read more