Below is the code for running 20x4 display LCD in 4 bit mode. You can copy the code and save it as a header file (.h) and then include the same in your main program.Please don't forget to change the PINs according to your sketch.Please leave a comment for any queries or feedback/* * lcd_lib.h *...
Home
C language
Showing posts with label C language. Show all posts
Showing posts with label C language. Show all posts
Programme for Binary search

#include<stdio.h>
#include<conio.h>
int arr[20];
int x;
void input()
{
int i;
printf("How many elements out of 20:\n");
scanf("%d",&x);
for(i=0;i<x;i++)
{
printf("Enter no.=");
scanf("%d",&arr[i]);
}
}
void search()
{
...
Programme to insert elements in stack/queue

/* Programme to insert element in stack and queue */
#include<stdio.h>
#include<conio.h>
int a[5],i=-1;
void menu();
void push();
void pop();
void display();
void main()
{
clrscr();
menu();
getch();
}
void menu()
{
int choice;
...
Programme to transpose a matrix

/* Programme to print transpose of matrix */
#include<stdio.h>
#include<conio.h>
void matrix(int x[3][3]);
void main()
{
int x[3][3],i,j;
clrscr();
printf("Enter elements of matrix:\n");
for(i=0;i<3;i++)
...
Programme to check Sparse matrix

/* wap to print sparse matrix */
#include<stdio.h>
#include<conio.h>
#define n 3
void main()
{
int i,j,a[n][n],count=0;
clrscr();
printf("Enter elements of matrix\n");
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
...
How To Make a HUT in C language
.png)
In this tutorial I had made a programme by which you can make a HUT in C language with the help of graphics. I had also added a image to get directions for you so you can make it...
Enjoy.. :)
/* Programme to make a HUT in C language with graphics */
#include<graphics.h>
#include<conio.h>
void...
C programme to convert decimal to binary & vice- versa

Link to Turbo C: HERE
/* Decimal to binary */
#include<stdio.h>
#include<conio.h>
void main()
{
int x,i,rev=0,num;
clrscr();
printf("Enter number in decimal:\n");
scanf("%d",&num);
for(i=num;i>0;i=i/2)
{
x=i%10;
rev=rev+x;
}
printf("\nBinary is: %d",rev);
getch();...
C programme for Double Link-list or Doubly by using structure

Link to Turbo C: HERE
/* programme of single Double link-list*/
#include<stdio.h>
#include<conio.h>
#include<stdlib.h> /* for malloc function */
struct student /*structure name defined */
{
int rno;
...
Turbo C/C++ for window 7/8

Link below to download turbo C/C++ for windows Xp/7/8.
For win 7/8 : HERE
For Xp: HERE
For Android phones: HERE
Enjoy coding..!!! ...
C programme for Single Link-List by using Structure

Link to Turbo C: HERE
/* programme of single link-list*/
#include<stdio.h>
#include<conio.h>
#include<stdlib.h> /* for malloc function */
struct student /*structure name defined */
{
int rno;
...
Subscribe to:
Posts
(
Atom
)