Q:

Write a C Program to check if mouse support is available or not in Graphics

0

Write a C Program to check if mouse support is available or not in Graphics. Here’s simple Program to check if mouse support is available or not in Graphics in C Programming Language.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Below is the source code for C Program to check if mouse is available or not in Graphics which is successfully compiled and run on Windows System to produce desired output as shown below :

 
 


SOURCE CODE : :

/*  C Program to check if mouse supports is available or not in Graphics  */

#include<stdio.h>
#include<dos.h>

int initmouse();
union REGS i, o;

int main() {
   int flag;

   flag = initmouse();

   if (flag == 0) {
      printf("Mouse support not available.");
   } else {
      printf("Mouse support available.");
   }

   return 0;
}

int initmouse() {
   i.x.ax = 0;
   int86(0X33, &i, &o);
   return (o.x.ax);
}

Above is the source code for C Program to check if mouse supports is available or not in Graphics which is successfully compiled and run on Windows System.The Output of the program is shown above .

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C Graphic Solved Programs – C Programming

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Write a C Program to create house and perform oper... >>
<< Write a C Program to Draw Triangle using Graphics...