Lecture 6 (Type Alias Flashcards

1
Q

What is type alias

A

A type alias is a different name by which a type can be identified.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the syntax for type alias

A

typedef — existing_type — new_type_name

OR

using new_type_name = existing_type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a structure

A

A structure is a group of data elements grouped under one name. These data elements, known as members, can have different types and different lengths

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you access struct members.

A

The syntax for that is simply to insert a dot(.) between the object name and the member name.

apple.weight
apple.price

How well did you know this?
1
Not at all
2
3
4
5
Perfectly