Question: The following C code defines a structure for student and then creates a student structure type variable by setting the no as 8 and
The following C code defines a structure for student and then creates a student structure type variable by setting the no as 8 and name as "Demo". One statement is missing in this C code. Please select one statement from the following options to make this program work. #include #include struct student int no: char name; }; void main() ( } struct student s; s.no = 8; printf("%d es ", s.no, s.name); A) strcat(s.name, "Demo") B) s.name = "Demo" C) strcpy(s.name, "Demo") D) s.name = {'D','e','m','o','\0'};
Step by Step Solution
3.45 Rating (161 Votes )
There are 3 Steps involved in it
The detailed answer for the above question is provided below The missing statement in th... View full answer
Get step-by-step solutions from verified subject matter experts
