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.
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 .
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 : :
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