Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

C Programming Exam for BSc (Hons) Software Development & Computer Networking - Year 3, Exams of Computer Engineering and Programming

The c programming examination paper for the bsc (hons) software development and computer networking - year 3 program at the cork institute of technology. The exam consists of four questions, covering topics such as linked lists, functions & string manipulation, structs and arrays, and pointers. The first question is compulsory and covers setting up a node for a flight record, reading flight details from a file, booking flights, and deleting flights from the linked list.

Typology: Exams

2012/2013

Uploaded on 03/28/2013

duraid
duraid 🇮🇳

4.3

(3)

55 documents

1 / 5

Toggle sidebar

Related documents


Partial preview of the text

Download C Programming Exam for BSc (Hons) Software Development & Computer Networking - Year 3 and more Exams Computer Engineering and Programming in PDF only on Docsity! CORK INSTITUTE OF TECHNOLOGY INSTITIÚID TEICNEOLAÍOCHTA CHORCAÍ Semester 1 Examinations 2012/13 Module Title: C Programming Module Code: SOFT7019 School: Science & Informatics Programme Title: BSc (Hons) Software Development and Computer Networking - Year 3 Programme Code: KDNET_8_Y3 External Examiner(s): Ms Erica Gill Internal Examiner(s): Ms G MacSweeney Instructions: Answer Question 1 and TWO other questions Duration: 2 Hours Sitting: Winter 2012 Requirements for this examination: Note to Candidates: Please check the Programme Title and the Module Title to ensure that you have received the correct examination paper. If in doubt please contact an Invigilator. Question 1 Linked Lists (Compulsory) (i) Set up a node to hold a flight record of information and a link pointer. The flight information should include a flight id, departure airport, destination airport and the total number of seats, the seats sold, the number of seats sold. Define the total number of seats as a constant. 4 (ii) Write the main code and functions to  Set up details of flights are read from the file “Flights.dat”  each flight has its own unique flight id.  The flights position is searched against the linked list.  When the flight is found, it is added to the correct position in the list. 14 (iii) Write a function and the main to book a flight for a customer. Use the search function provided in (ii)  Locate the flight in the list  Enter the required number of seats  Check the number of seats sold to date against the total  Find the number of required seats by the customer  Decide whether flights can be booked or not and book the flight 10 (iv) Write all the code to do the following and show how it is used in the main. A flight is no longer in use.  Find the node to be deleted using the search function in (ii).  Delete this flight from the Flight linked List  Display the contents before and after deletion. State that the record is deleted. 12 Question 1 40 marks
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved