Menu
×
×
Correct!

Exercise:

Fill in the missing parts to assign the following values to the car1 variable:

"BMW" to brand, "X5" to model and 1999 to year.

struct Car { char brand[50]; char model[50]; int year; }; int main() { struct Car car1 = {"BMW", "X5", 1999}; return 0; }

Not Correct

Click here to try again.

Correct!

Next ❯
struct Car {
  char brand[50];
  char model[50];
  int year;
};

int main() {
  struct Car car1 = {, , };
  return 0;
}

    
  




Go to w3schools.com
Reset Score
Close This Menu

Completed 0 of 39 Exercises:

C Syntax
C Comments
C Variables
C Data Types
C Operators
C If...Else
C Switch
C Loops
C Arrays
C Strings
C Pointers
C Functions
C Structures

×

Reset the Score?

This will reset the score of ALL 39 exercises.

Are you sure you want to continue?



×

Congratulations!

You have finished all 39 C exercises.

Share your score: