473,698 Members | 2,196 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Adding student marks to a Linked List

1 New Member
I was given to write a C program using Linked list to enter student marks, but i can't figure out how this node insertion works:
how nodes are linked with each other???


A Computer Training Institute wants to store marks of the Theory and Practical Papers of Data Structures & Algorithm. This system keeps the Registration Number and the Name other than the two marks, and all the records should be inserted in increasing order of the Registration Number.

• Use a suitable data structure to solve this problem.
• Store at least 5 different records in your program.
• Display all the records you have stored. All the records should be displayed as follows.



Reg. No Name Theory Practical
101 Silva 55 30
102 Perera 38 28
104 Fernando 55 20
105 Peries 15 18

• Now write a function/s to insert the records of the students whose Registration Numbers are 103 and 106 in the correct positions.

• Write a function to search a given student record specified by the registration number.

• Display all the items again and check whether they have inserted properly.


thanks in advance
Sep 2 '09 #1
3 6963
OraMaster
135 New Member
@praveenaj
You may need to know
1. What are linked lists and their types and how it works?
2. Try to insert a node into an ordered linked list on the basis of reg. no. (this is what u need to implement)
Try to search on Google for the same and do some programming stuffs and let everybody know what you understood and what problems you are facing.
Kind Regards,
Bhushan
Sep 2 '09 #2
weaknessforcats
9,208 Recognized Expert Moderator Expert
I stingly recommend that you write a single function that inserts NodeB after NodeA:

Expand|Select|Wrap|Line Numbers
  1. Insert(Node* NodeA, Node* NodeB);
and use this function in the rest of your linked list code. This will avoid re-solving the node insertion over and over and over again.

Are you allowed to use C++? If so, you can use the linked list container list<> where all this have been done professionally aned debugged for you. Otherwise, you will need to re-invent this wheel again.
Sep 3 '09 #3
weaknessforcats
9,208 Recognized Expert Moderator Expert
I forgot to say that the Insert function from my previous post will have only 5 lines of code in it.
Sep 3 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
3754
by: Marek Mänd | last post by:
<style type="text/css"> q:after{content:',"'} </style> <q>This will be the shame of CSS</q> claimed Marek Mänd and added that <q>consumers expect to create generated content via CSS where there would be no comma right after HERE</q>
2
4200
by: PRadyut | last post by:
In this code i tried to add the elements in ascending order but the output is only 0 1 2 the rest of the elements are not shown. the code ---------------------------------------------------------- #include <stdio.h>
3
34460
by: sandy | last post by:
I am a student who is losing his mind. The code below is a header file which has the line: void ClearList(ListType *list); which generates the following compile time errors: variable or field `ClearList' declared void expected `;' before '(' token
6
5772
by: sandy | last post by:
I am creating a class (or so I hope) which is to be a JobCollection, linked list of 'Job'. Job is another class already created. JobCollection is just the linked list manager. I have to have this separated into a .h and .cpp file. The code I am attempting to put into the class is code that I have used before, but simply put into the same file/class with the rest of the application. My header looks like this: <code>
18
2198
by: mankolele | last post by:
How do I restrict a person from seeing evrything that I have on my database to them seeing only their information and products for them to be able to UPDATE,EDIT and DELETE their own only Thanx
11
1964
by: CrostonScottish | last post by:
I've got myself a bit mixed up with all my sqls and subforms. I am a bit new to relationship databases. I have a database designed for booking students on to courses run at our hospice. It is based on three main tables. , and a table to link these . I have a form based on with a subform based on an SQL query which i have listed below. This shows the details of the course(s) the student is registered on or have been on previously: ...
3
2683
by: Synapse | last post by:
hi everyone..im trying to create a student list program using linked list that will display all my info of students..but it seems theres a little prob. after i enter my first student the program will exit.. can somebody help me please. thank you #include <stdlib.h> #include <iostream.h> #include <string.h> #include <conio.h> class student {
2
1189
by: xpertbyshishir | last post by:
I am working on a Asp.Net project where i want to add controls with each row that i add to the design . i'l explain with an example.. suppose i have student name as my main fieldname, whose information needs to be displayed or updated.When i retreive a user name, i want that controls corresponding to it should also be added, like checkbox to be added, if he's a science student, radio button to show how his marks should be displayed(total,...
1
4902
by: swethak | last post by:
Hi, I am desiging the calendar application for that purpose i used the below code. But it is for only displys calendar. And also i want to add the events to calendar. In that code displys the events when click on that date that perticular event displyed in a text box.But my requirement is to when click on that date that related event displyed in same td row not the text box. and also i add the events to that calendar.plz advice how to...
0
8674
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8603
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9027
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8861
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7725
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4369
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2329
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.