www.vustudents.ning.com

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

# CS508 Assignment # 2 has been uploaded on VULMS covering lectures 1 to 17 . Its due date is Due Date: May. 24, 2017

Objectives:

Understand and get hands on experience of:

• Programming tool for Ada language like Ada GIDE or GPS (GNAT Programming Studio)
• Array, Loop, Pieces the array and copy chunks(pieces) of array

Write a program in Ada language which will copy chunks of data from source to destination array.

Assignment Instructions:

In this program, you need to declare two arrays (one dimensional) of size sixteen (16) with names “Source” and “Destination”. Source array should contain numeric values from 11 to 26, as showing in below diagram. Then source array should be logically divided into four chunks. Each chunk will have four numeric values. Your program will copy the chunk of array from source array to destination array. Arrows shown in diagram will help you to see which chunk will copy at which location. After copying the chunks, display data of source and destination arrays as shown in sample output screen shot.

Important Note:

Make sure that you copy a complete chunk using single statement instead of copying elements one by one. Marks will be deducted in case of copying data elements one by one.

Views: 3335

Attachments:

### Replies to This Discussion

Check the link below for solution
https://youtu.be/1ABQnhJZ0Go

Send solution

Idea Solutuion for cs508

kiya ap bta skte hen k hum ye code kahan likhen g ??????????? i mean koi application something else?????plzzz bta den

they have written above
Programming tool for Ada language like Ada GIDE or GPS (GNAT Programming Studio

procedure Hello is

type MyArray is array (1..16) of Integer;

procedure put(s: MyArray) is
begin
for i in s'range loop
put(s(i), width=>4);
end loop;

end put;
s: MyArray := (11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26);
d: MyArray :=s;

begin
Put_Line ("chunk of source array:");
put(s);

Put_Line("chunks of destination array:");
d(1 .. 4) := s(9 .. 12);
d(5 .. 8) := s(1 .. 4);
d(9 .. 12) := s(12 .. 8);
d(13 .. 16) := s(5 .. 8);
put(Destination);
end Hello;

compile kerty hoy error aa raha hay es code main

Amna je aapko ada compilar download aur install karne ki koi zarorat nahi hain, aap na code leke sidha online ada compilar pe compile kare aur execute bhi.

YE NECHE LINK JU DEYA HAIN, YE ADA ONLINE COMPILAR KA HAIN,

es ka b kuch khas faida nai  u should have to download application

1

2

3

4

5

## Latest Activity

AbdulRabecca updated their profile
4 hours ago
Attas updated their profile
10 hours ago
Ahmed Salman, Abdul Wahab, mubashar and 4 more joined Virtual University of Pakistan
10 hours ago
Abdul Wahab joined + M.Tariq Malik's group

### MGT503 Principles of Management

11 hours ago
mubashar, AbdulRabecca and Wasim joined + M.Tariq Malik's group

### PAD603 Governance, Democracy and Society

11 hours ago
Abdul Wahab joined + M.Tariq Malik's group