Modify value
// Create a struct variable and assign it a value
struct myStructure s1 = {
13, 'B'
};
// modify the value
s1.myNum = 30;
s1.myLetter = 'C';
// print value
printf("%d %c %s",
s1.myNum,
s1.myLetter);
Comments
// Create a struct variable and assign it a value
struct myStructure s1 = {
13, 'B'
};
// modify the value
s1.myNum = 30;
s1.myLetter = 'C';
// print value
printf("%d %c %s",
s1.myNum,
s1.myLetter);