Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Summary

Summary Summarize content Implementing Array as an Abstract Data Type in C Language.

Rating
-
Sold
-
Pages
1
Uploaded on
26-03-2023
Written in
2022/2023

this is the summarize content about Implementing Array as an Abstract Data Type in C Language.

Institution
Course

Content preview

Implementing Array as an Abstract Data Type in C Language
ByAnonymous–
My preference is installing the MinGW 64-bit compiler. And you should download and install this.
Along with that, please download Visual Studio Code. The biggest advantage of this is that
today I 'm writing C language Code in Visual Studio. Tomorrow I can write C++ , then HTML and
JavaScript and even Typescript. In Visual Studio, I 've made a snippet of boilerplate code for
Array ADT. If I write C boilerplate here, this C thing comes automatically. If you do n't know where
to get this code or If you don't know how to use it,. The lesser the programme uses memory, The
more optimised it 's assumed to be. For example, if Google is taking up too Chrome much RAM
You 'd wish for it to take up less RAM. But keeping in mind the users ' experience , The team of
Google Chrome must have taken some decisions To make.
A custom My Array abstract ADT uses a pointer that points toward the total size, the used size
and the first element. Assume that I want to store the marks scored by some kids. My array can
not go beyond this Because the compiler has reserved the remaining memory for someone else.
If your seat number is 0,1,2,3,4 or 5; you 've made your reservation on these seats in the train
When the train runs and the chart is made , But then you say that you want seat number 6 ; Then
you ca n't get it. This is how I felt it should be implemented. I 'm defining a few methods in this.
There can be another implementation as well. I have written the function inside this Now I can
use it. And once I get the structure instance , Then I can add a dot and access its total size or
anything. and. . . = t size I 'll want that this t-size is passed And along with that , I 'd want that
used size should also be passed. And what I also want is that I should set this pointer on my
own. We 've even set that we have to use 20 blocks only. We 'll see if we ever want to use the
21st, we 'll add it if we need it, using the Insert operation. But for now, we must use only 20
blocks. So what will the createArray function do ? It will create this array.
We put a star when we want the value of the address and call the ampersand the address of the
operator. If you want the structure , you 'll have to put the address from the structure. And if you
want to use 20 and want to make it 100. So what will it do ? This structure that you have passed
by address i. e this is where you 've given the structure address , It will dereference that with a
star. So I sent its address ; I said take the structure at this address. It replied , okay. I 'm only
displaying all the elements being used of that array. So for that I 'll have to call for the
createArray function. This will do what ? It will call on as much memory as I request in the heap.
And it will update its pointer in this itself. That 's why this function is n't returning anything. It 's in
my Python course but it 's very useful. So here instead of 'printf ' I 'll write 'scanf '. And here I will
write scanf % d & n & n.

Written for

Institution
Course

Document information

Uploaded on
March 26, 2023
Number of pages
1
Written in
2022/2023
Type
SUMMARY

Subjects

$10.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
anonymous18

Also available in package deal

Get to know the seller

Seller avatar
anonymous18 My Own
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
3 year
Number of followers
0
Documents
5
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions