#include<stdio.h>struct TeamScore{ int wickets; int score;}ts = {2, 325};struct country{ char *name;}coun = {"India"};int main(){ struct TeamScore tcon = ts; printf("%d %s %d", tcon.score, ts.wickets, coun.name); return 0;}
Question
#include<stdio.h>struct TeamScore{ int wickets; int score;}ts = {2, 325};struct country{ char *name;}coun = {"India"};int main(){ struct TeamScore tcon = ts; printf("%d %s %d", tcon.score, ts.wickets, coun.name); return 0;}
🧐 Not the exact question you are looking for?Go ask a question
Solution
It seems like you're trying to print out the score, wickets, and country name using a C program. However, there's a mistake in your printf statement. The correct statement should be:
printf("%d %d %s", tcon.score, tcon.wickets, coun.name);
Here's the corrected program:
#include<stdio.h>
struct TeamScore{
int wickets;
int score;
} ts = {2, 325};
struct country{
char *name;
} coun = {"India"};
int main(){
struct TeamScore tcon = ts;
printf("%d %d %s", tcon.score, tcon.wickets, coun.name);
return 0;
}
This program will print out the score, wickets, and country name in the format: "325 2 India".
Similar Questions
0/0
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.