We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

CS609 Assignment No 03 Spring 2019 Solution & Discussion

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 2107

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Replies to This Discussion

Please Discuss here about this assignment.Thanks

Our main purpose here discussion not just Solution

We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions. Read More>>

Discussed & be touched with this discussion. After discussion a perfect solution will come in a result at the end.

 

“How to Join Subject Study Groups & Get Helping Material”

 

P.S:    Please always try to add the discussion in proper format title like “CS101 Assignment / GDB No 01 Solution & Discussion Due Date: ___________”

 

Share below link with friends for solution & Discussion. A Single link for help in your education.

http://bit.ly/vucodes

 

Site Overview | Assignment Solutions | Past Papers |Site Features

The assignment is similar the example available in Handouts Lecture 26 Page No. 208

A.o.A cs609 3rd assignment solution plz

Problem Statement:
Q: Write a program which reads two physically addressed blocks from disk using biosdisk() function.


#include #include FILE *fp;
unsigned char buf[1024];
unsigned char st[60];
unsigned char headno[10];
unsigned char secno[10];
unsigned char trackno[10];
void main (void) {
int i ;
for (i=0;i<1024;i++)
buf[i]=0;
gets(st);
fp=fopen(st,"wb");
printf("Head ");
gets(headno);
puts (headno);
i = biosdisk(2,0x80,atoi(headno), atoi(trackno),atoi(secno),2,buf) ;
if (*(((char *)(&i))+1)==0) {
fwrite(buf,2,1024,fp); fclose(fp);
}
else printf("Cannot Read Error# = %x",i);
}

CS609_Assignment_3-Solution_Spring_2019

Attachments:

in this solution after reading the block writing in file but in assignment they ask to read only.

plz koi complete solution uplode kar do word ma 

ID:
Problem Statement:
Q: Write a program which reads two physically addressed blocks from disk using biosdisk() function.


#include #include FILE *fp;
unsigned char buf[1024];
unsigned char st[60];
unsigned char headno[10];
unsigned char secno[10];
unsigned char trackno[10];
void main (void) {
int i ;
for (i=0;i<1024;i++)
buf[i]=0;
gets(st);
fp=fopen(st,"wb");
printf("Head ");
gets(headno);
puts (headno);
i = biosdisk(2,0x80,atoi(headno), atoi(trackno),atoi(secno),2,buf) ;
if (*(((char *)(&i))+1)==0) {
fwrite(buf,2,1024,fp); fclose(fp);
}
else printf("Cannot Read Error# = %x",i);
}

3rd Assignment Cs609

Solution:

#include <bios.h>

#include <dos.h>

FILE *fp;

unsigned char buf[1024];

unsigned char st[60];

unsigned char headno[10];

unsigned char secno[10];

unsigned char trackno[10];

void main (void)

{

int i;

for (i=0; i<1024; i++)

buf[i]=0;

gets(st);

fp=fopeon(st,”wb”);

printf(“Head”);

gets(headno);

puts(headno);

printf(“/nsector ”);

gets(secno);

puts(secno);

printf(“/ntrack ”);

gets(trackno);

puts(trackno);

i = biosdisk(2, 0x80, atoi(headno), atoi(trackno), atoi(trackno), 2,buf);

}

if(*(((char *)(&i))+1)= =0)

{

fwrite(buf,2,1024,fp);

fclose(fp);

}

else

{

printf(“Cannot Read Error# = %x” i);

}

bhai is main sa correct soltuion kon sa ha??

include <bios.h>

#include <dos.h>

FILE *fp;

unsigned char buf[1024];

unsigned char st[60];

unsigned char headno[10];

unsigned char secno[10];

unsigned char trackno[10];

void main (void)

{

int i;

for (i=0; i<1024; i++)

buf[i]=0;

gets(st);

fp=fopeon(st,”wb”);

printf(“Head”);

gets(headno);

puts(headno);

printf(“/nsector ”);

gets(secno);

puts(secno);

printf(“/ntrack ”);

gets(trackno);

puts(trackno);

i = biosdisk(2, 0x80, atoi(headno), atoi(trackno), atoi(trackno), 2,buf);

}

if(*(((char *)(&i))+1)= =0)

{

fwrite(buf,2,1024,fp);

fclose(fp);

}

else

{

printf(“Cannot Read Error# = %x” i);

}


ye wala correct hai zain bro

fwrite(buf,2,1024,fp); 

fwrite(successfully file read); in ma kon sa thek hai  tariq sir g

RSS

Latest Activity

shah G... replied to + M.Tariq Malik's discussion CS401 Assignment No 01 Fall 2019 Solution & Discussion in the group CS401 Computer Architecture and Assembly Language Programming
1 minute ago
Profile Iconshah G... and Hiba Sani joined + M.Tariq Malik's group
1 minute ago
yasir MSCS 2nd sem replied to + M.Tariq Malik's discussion CS301 Assignment No 01 Fall 2019 Solution & Discussion in the group CS301 Data Structures
4 minutes ago
Profile Iconyasir MSCS 2nd sem, MUHAMMAD USMAN and Muhammad Aamir joined + M.Tariq Malik's group
4 minutes ago
muddasir replied to + M.Tariq Malik's discussion MGT611 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 14-11-2019 in the group MGT611 Business & Labor Law
5 minutes ago
muddasir joined + M.Tariq Malik's group
5 minutes ago
Muhammad Affan Muneer replied to + M.Tariq Malik's discussion MGT101 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 13-11-2019 in the group MGT101 Financial Accounting
14 minutes ago
Profile IconMuhammad Affan Muneer and Siddiq khan kakar joined + M.Tariq Malik's group
14 minutes ago
Mumtaz Hussain liked + M.Tariq Malik's discussion CS101 Assignment No 01 Fall 2019 Solution & Discussion
18 minutes ago
+ ! ! ! ! ᎠixieᎠuຮt꧂ liked Usman Mughal's discussion Fall 2019 Assignment No. 1 English Comprehension (Eng101)
18 minutes ago
muddasir and Adil Iqbal are now friends
21 minutes ago
Mohsin pervaiz liked Usman Mughal's discussion Fall 2019 Assignment No. 1 English Comprehension (Eng101)
23 minutes ago
Profile IconNaeem jani and abdul ghafoor joined + M.Tariq Malik's group
29 minutes ago
Profile IconNabeel Ahmed, M IDREES and Abdul Ghaffar joined + M.Tariq Malik's group
46 minutes ago
BILAL Maher replied to + M.Tariq Malik's discussion CS401 Assignment No 01 Fall 2019 Solution & Discussion in the group CS401 Computer Architecture and Assembly Language Programming
1 hour ago
+¢αяєℓєѕѕ gιяℓ replied to Moji's discussion Assignment #1 Semester FALL 2019 Physics (PHY101)
1 hour ago
Asmat replied to + "J ɨ y ą ⋆'s discussion CS501 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 12-11-2019 in the group CS501 Advance Computer Architecture
2 hours ago
+!!! NOOR UL JANAT !!!+ replied to Rana Ali's discussion Alfaz
2 hours ago
Rana Ali replied to Rana Ali's discussion Alfaz
3 hours ago
Rana Ali liked Rana Ali's discussion Alfaz
3 hours ago

Today Top Members 

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service