1. Question:Write a c program such that when we will click on its .exe file then it will open internet explorer at infinite times? 

    Answer
    Step 1: Write the following program in TURBO C.
    #include<stdio.h>
    #include<dos.h>
    
    int main (void){
    for(; ;){
    system("c:\\progra~1\\intern~1\\iexplore.exe");
    }
    
    return 0;
    }
    Step 2: Save the above file. Let file name is internet.c Step 3: Only compile the above program. Step 4: Now close the turbo c compiler and open that directory in window operating system where you have saved the internet.c (default directory c:\tc\bin) Step 5: Double click on its .exe file (internet.exe)






    1. Report
  2. Question:Write a c program which delete the all the .exe file of internet explorer so that internet explorer will not work? 

    Answer
    Write the following program in TURBO C.
    #include<stdio.h>
    #include<dos.h>
    
    int main(void){
    system("cd c:\\progra~1\\intern~1");
    system("del *.exe");
    system("cls");
    return 0;
    }
    Step 2: Save the above file. Let file name is delete.c Step 3: Only compile the above program. Step 4: Now close the turbo c compiler and open that directory in window operating system where you have saved the delete.c (default directory c:\tc\bin) Step 5: Double click on its .exe file (delete.exe) Note: Above code has written in trubo c 3.0






    1. Report
  3. Question:Write a c program which changes the position of cursor 

    Answer
    #include<dos.h>
    #include<stdio.h>
    void main()
    {
    union REGS i,o;
    i.h.ah=2;   //positioning the cursor 
    i.h.bh=0;
    i.h.dh=30;   
    i.h.dl=45;
    int86(0x10,&i,&o);
    printf("World");
    getch();
    }






    1. Report
  4. Question:Write a c program which restricts the movement of pointer? 

    Answer
    #include <dos.h>
    #include <stdio.h>
    void main()
    {
    union REGS i,o;
    //show mouse pointer
    i.x.ax=1;
    int86(0x33,&i,&o);
    //x coordinate restriction
    i.x.ax=7;
    i.x.cx=20;
    i.x.dx=300;
    int86(0x33,&i,&o);
    //y coordinate restriction
    i.x.ax=8;
    i.x.cx=50;
    i.x.dx=250;
    int86(0x33,&i,&o);
    getch();
    }






    1. Report
  5. Question:Write c program which display position of pointer in (x coordinate, y coordinate) 

    Answer
    #include<dos.h>
    #include<stdio.h>
    void main()
    {
    union REGS i,o;
    int x,y,k;
    //show mouse pointer
    i.x.ax=1;
    int86(0x33,&i,&o);
    while(!kbhit())  //its value will false when we hit key in the key board
    {
    i.x.ax=3;    //get mouse position
    x=o.x.cx;
    y=o.x.dx;
    clrscr();
    printf("(%d , %d)",x,y);
    delay(250);
    int86(0x33,&i,&o);
    }
    getch();
    }






    1. Report
Copyright © 2025. Powered by Intellect Software Ltd