Write a function which fills the whole screen with blanks space-00397
This subjective question is related to the book/course vu cs201 Introduction to Programming. It can also be found in vu cs201 Mid Term Solved Past Paper No. 9.
Question 1: Write a function which fills the whole screen with blanks (space).
void main() {
int i;
for (i=0; i<2000; i++) {
*scr=0x20;
*(scr+1)=0x07;
scr=scr+2;
}
}
Answer:
unsigned char far *scr= (unsigned char far*)0xb8000000 void main() {
int i;
for (i=0; i<2000; i++) {
*scr=0x20;
*(scr+1)=0x07;
scr=scr+2;
}
}