Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(a) The structure register contains the date of registration for a student in a university. Write down the structure declaration of register. (Struktur register mengandungi

image text in transcribed

image text in transcribed

(a) The structure register contains the date of registration for a student in a university. Write down the structure declaration of register. (Struktur register mengandungi tarikh pendaftaran untuk seorang pelajar di sebuah universiti. Tuliskan pengisytiharan struktur untuk register.) (4 Marks / Markah) (b) The structure of student contains information about a student. The information stored in the structure are the name, date of registration, year of study (19 year - 4th year) and the program of the student. Using the answer from Question 1 (a), write down the declaration of the structure. [Struktur student mengandungi maklumat berkenaan seorang pelajar. Maklumat yang disimpan di dalam struktur adalah nama, tarikh pendaftaran, tahun pengajian (tahun 1 - tahun 4) dan program seorang pelajar. Dengan menggunakan jawapan dari Soalan 1 (a), tuliskan pengisytiharan struktur. (5 Marks / Markah) (c) Vicky has registered on UniMAP during his 3rd year of study on 15 October 2021. Write a program to store this information in the structure and then display all information using printf() by accessing the information in the structure. [Vicky telah mendaftar di UniMAP semasa berada di tahun ke-3 pengajiannya pada 15 Oktober 2021. Tuliskan aturcara untuk menyimpan maklumat ini di dalam struktur dan kemudian paparkan semua maklumat menggunakan printf () dengan mengakses maklumat di dalam struktur. (8 Marks / Markah) (d) A pointer is declared as: [Satu penunjuk diisytihar sebagai:) struct student* student_info_ptr; student_info_ptr = & student_info; Write down the code to store the information of Vicky in the structure using student_info_ptr. [Tuliskan kod untuk menyimpan maklumat Vicky dalam struktur dengan menggunakan student_info_ptr.) (3 Marks / Markah) ....3/- Question 2 (Soalan 27 The structure of Marks contains information of the assignment and test marks of a student in C Programming subject. Based on the given sample output, write a program to add two sets of marks entered by user and then display all information using printf() by accessing the information in the structure. [Struktur Marks mengandungi maklumat tugasan dan markah ujian pelajar dalam mata pelajaran Pengaturcaraan C. Berdasarkan output sampel yang diberikan, Tuliskan aturcara untuk menambah dua set tanda yang dimasukkan oleh pengguna dan kemudian paparkan semua maklumat menggunakan printf() dengan mengakses maklumat dalam struktur.) Sample output: Contoh output: First Term Enter assignment mark: 10 Enter test mark: 8 Second Term Enter assignment mark: 7 Enter test mark: 8 Sum of marks: 17-16 (10 Marks/Markah)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning ASP.NET 4.5 Databases

Authors: Sandeep Chanda, Damien Foggon

3rd Edition

1430243805, 978-1430243809

More Books

Students also viewed these Databases questions

Question

How many variables must be known to solve a kinematic equation?

Answered: 1 week ago