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.
2
Q
What is the syntax for type alias
A
typedef — existing_type — new_type_name
OR
using new_type_name = existing_type
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
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