Home / C

C

How to do Message Encoding in C Program using Matrix Multiplication?

Now, if you want to do message encoding in C program and using Matrix multiplication, then here is the C program for performing message encoding. Use this source code and output example to perform message encoding in C program. Message Encoding in C Program Source Code /* Restriction: Input string has to be in lower case without any special characters ...

Read More »

How to find inverse of a matrix in C programming?

In order to find inverse of a matrix in C programming, you need to know about the C program example for the task of finding inverse of a matrix. So here is the code to use. C Program to find inverse of a matrix – C code examples Source Code for finding inverse of a matrix in C #include<stdio.h> #include<math.h> ...

Read More »

How to Solve Linear Equation in One Variable In C Programming?

C Program to Solve any Linear Equation in One Variable Find complete C program to solve Linear equation in one variable. This is one of the most important mathematical programs for C to  know how to solve linear equation in C program. #include <stdio.h> #include <string.h> float solve_for_y(float a, float b, float c) { float Y = Y = -(b ...

Read More »

Restrict Mouse Pointer Position C Graphics Program

This C Program will restrict the Mouse Pointer location or to a particular position or x,y coordinates. The C Graphics Mouse Program will give you more insights. The Other Similar Programs are: Restrict Mouse Pointer in Circle Restrict Mouse Pointer in Rectangle //restrict the x and y coordinate #include <dos.h> #include <stdio.h> void main() { union REGS i,o; //show mouse pointer i.x.ax=1; int86(0x33,&i,&o); ...

Read More »

C Program to restrict Mouse pointer in a Rectangle

This C Program will restrict the Mouse pointer Position in the Rectangle. The Mouse Programs are listed here if you want to learn more C Graphics Programs for Mouse. Also If you want to learn how to restrict the Mouse Pointer in Circle then check here. #include<dos.h> #include<graphics.h> #include<conio.h> int initmouse(); void showmouseptr(); void hidemouseptr(); void restrictmouseptr(int, int, int, int); union REGS i, o; main() { ...

Read More »

Restrict Mouse Pointer in Circle C program

How to restrict Mouse Pointer in Circle using c Graphics Programming is given here. #include<graphics.h> #include<conio.h> #include<dos.h> #include<stdlib.h> #include<math.h> union REGS i, o; int initmouse() { i.x.ax = 0; int86(0X33, &i, &o); return ( o.x.ax ); } void showmousepointer() { i.x.ax = 1; int86(0X33, &i, &o); } void hidemopusepointer() { i.x.ax = 2; int86(0X33,&i,&o); } void getmousepos(int *x, int *y) { ...

Read More »

Hide Mouse Pointer C Program

How to Hide a Mouse Pointer Program in C : This program will show and hide the mouse pointer after each user input by a key stroke. Illustration & Example: There are two functions used in the program- showmousepointer(); -> To Show / display the pointer hidemousepointer(); -> to Hide / disappear the pointer   Initialise the Graphics using a graphic driver variable. Then ...

Read More »

C Program to find the Largest Digit in the Number

Write a Program in C to find the Largest Digit in the number. This is a simple code which will use a While loop or a for loop However while loop is the best option for this type of problem. The two methods are mentioned here but there can be many solutions for the same with each individual having its own programming Logic. ...

Read More »

While Loop in C Syntax, Flow Chart and Example

While Loop in C: While loop is a conditional control looping statement in C which is used in iterative logics. In While Loops the et of instructions given inside the loop keeps on repeating until the condition becomes false. While Loop Syntax while(condition) { statement(s); } Here, statement(s) may be a single statement or a set of multiple statements. Condition can be any ...

Read More »

C Program to get current position of a mouse pointer

This is a C program to get the Current Mouse pointer location or position as a output in C Graphics. When you move your cursor the Mouse location will change with the pointer itself. This is a Program in C Graphics which used 3 user defined functions. hidemouseptr(); -> Used to hide the Mouse Pointer showmouseptr(); -> To Show the ...

Read More »