ol muser
asked on
Initialize struct in C
Given struct A, what is the difference between these two initializations?
//begin code
C c1 = {0};
C c2 = {0,};
//end code
Yes, I see some places where they initialize with a zero and a comma.
//begin code
C c1 = {0};
C c2 = {0,};
//end code
Yes, I see some places where they initialize with a zero and a comma.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
There is absolutely no difference. The trailing comma is just a syntactic convenience, as alluded by Zoppo.
ASKER
Thanks
ASKER
Thanks both