Print Student Record
You are given a pointer to a Student structure.
The structure contains the following fields:
- roll (integer)
- name (string)
Your task is to access and print the fields name and roll respectively each on new line.
Example 1:
Input: Student = { roll = 23, name = "Raj" }
Output:
Raj
23
Example 2:
Input: Student = { roll = 5, name = "Nilesh" }
Output:
Nilesh
5
Still unsure what the problem is asking ?
Let’s go through a few more examples, step by step, to make it clearer.
Constraints:
- 1 <= rollNumber <= 100
- name consist of only lowercase and uppercase English letters
- 1 <= name.size() <= 100