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

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 1 int no: char name [20]; void main() 1 J struct student s; s.no = 8; ; printf("%d es ", s.no, s.name); A) s.name = ('D', 'e','m', 'o',"'\0'}; B) strcpy(s.name, "Demo") s.name = "Demo" D) strcat(s.name, "Demo")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The detailed answer for the above question is provided below The correct statement to make the progr... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Network Questions!