C language

Internet Webed: C language

Internet Webed: C language

Showing posts with label C language. Show all posts
Showing posts with label C language. Show all posts

How To Make a HUT in C language

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 main()
{
int gm,gd=DETECT;
initgraph(&gd,&gm,"C:\\TurboC3\\BGI");
line(20,50,150,50);
line(20,50,5,100);
line(20,50,40,100);
rectangle(5,100,40,180);
rectangle(40,100,180,180);
line(150,50,180,100);
rectangle(85,120,125,160);
line(105,120,105,160);
line(85,140,125,140);
rectangle(10,120,35,180);
line(10,120,17,130);
line(10,180,17,170);
line(35,120,25,130);
line(35,180,25,170);
line(17,130,17,170);
line(25,130,25,170);
circle(20,85,5);
line(10,180,60,340);
line(35,180,180,340);
circle(35,200,5);
circle(55,250,15);
circle(90,310,25);
line(140,200,140,220);
line(160,200,160,220);
line(140,210,160,210);
rectangle(170,200,190,220);

C programme for Double Link-list or Doubly by using structure

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;
    char name[20];
    struct student *nadd,*padd;
}*f,*m,*ptr;
void menu();
void create();
void insert();
void insertfirst();
void insertany_before();
void deletefirst();
void deletelast();
void deleteany();
void display();
void ext();
void main()

C programme for Single Link-List by using Structure

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;
    char name[20];
    struct student *add;
}*f,*m,*ptr;
void menu();
void create();
void insert();
void insertfirst();
void insertany_before();
void deletefirst();
void deletelast();
void deleteany();
void display();
void ext();
void main()