About
Pricing
Community
Teams
Start Free Trial
Log in
ol muser
asked on
4/19/2017
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.
C
4
1
Last Comment
ol muser
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Zoppo
4/19/2017
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
evilrix
4/20/2017
There is absolutely no difference. The trailing comma is just a syntactic convenience, as alluded by Zoppo.
ol muser
4/20/2017
ASKER
Thanks
ol muser
4/20/2017
ASKER
Thanks both
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck