Hafsa Software

Hafsa Software

Share

We have a very dynamic team to build different modern websites for you and your company. We offer in very cheap rate :

� Business Websites,
� E-Commerce,
� Service selling sites,
� Personal Portfolio,
� Business profile of companies. We use :

� (.Net) Dontet core MVC
� (.Net) Dotnet core API
� MSSQL
� Oracle
� Angular
� Javascript

07/12/2021

Work for that things, which one will work for you lifetime.

23/05/2018

Encryption code for file content :: # # # # #




int main()
{
FILE *fptr1, *fptr2;
char c;
// Open one file for reading
fptr1 = fopen("encryption.txt", "r");
if (fptr1 == NULL)
{
printf("Cannot open file encryption.txt\n");
exit(0);
}
// Open another file for writing
fptr2 = fopen("encryption2.txt", "w");
if (fptr2 == NULL)
{
printf("Cannot open file encryption2.txt \n");
exit(0);
}
// Read contents from file
c = fgetc(fptr1);
while (c != EOF)
{
fputc(c + 3, fptr2);
c = fgetc(fptr1);
}
printf("\nContents copied to encryption2.txt");
fclose(fptr1);
fclose(fptr2);
fptr1 = fopen("encryption.txt", "w");
remove("encryption.txt");
return 0;
}

11/08/2017

BST::Insertion:Searching:print::


struct node
{
int n;
struct node *left;
struct node *right;
};
struct node *head=NULL;
void insert(int y);
int searche(struct node *r,int s);
//int delet(struct node*r, int key);
void printl(struct node *t);
void printr(struct node *head);

int main()
{

int x,y,s,key;
printf("*********Menu********\n");
printf("1.Print all elements of TREE\n");
printf("2.insert elemnts\n");
printf("3.Search elements\n");
//printf("4.Delete Elements\n");
printf("press 5 for Exit operation\n");
//printf("Enter your Choice\n");
printf("\n");
struct node *a,*b,*c,*d,*e,*f,*g,*h,*i;
a=(struct node *)malloc(sizeof(struct node));
b=(struct node *)malloc(sizeof(struct node));
c=(struct node *)malloc(sizeof(struct node));
d=(struct node *)malloc(sizeof(struct node));
e=(struct node *)malloc(sizeof(struct node));
f=(struct node *)malloc(sizeof(struct node));
g=(struct node *)malloc(sizeof(struct node));
h=(struct node *)malloc(sizeof(struct node));
i=(struct node *)malloc(sizeof(struct node));
head=a;
a->n=40;
a->left=b;
a->right=c;
b->n=35;
b->left=d;
b->right=e;
c->n=50;
c->left=f;
c->right=NULL;
d->n=30;
d->left=NULL;
d->right=NULL;
e->n=37;
e->left=g;
e->right=NULL;
f->n=45;
f->left=NULL;
f->right=h;
g->n=33;
g->left=NULL;
g->right=NULL;
h->n=48;
h->left=NULL;
h->right=i;
i->n=60;
i->left=NULL;
i->right=NULL;
while(1)
{
printf("Enter your choice from main menu\n");
scanf("%d",&x);
printf("\n");
switch(x)
{
case 1:printl(head);
break;
case 2:printf("Enter the element you want to insert\n");
scanf("%d",&y);
insert(y);
break;

case 3:printf("Enter the value you want to search\n");
scanf("%d",&s);
searche(head,s);
break;
case 5:exit(0);

}
}
}

void printl(struct node *t)
{
if(t!=NULL)
{
printl(t->left);
printf("%d\n",t->n);

printl(t->right);
}
}

void insert(int y)
{
struct node *temp,*p;
temp=(struct node *)malloc(sizeof(struct node));
p=(struct node *)malloc(sizeof(struct node));
temp->n=y;
temp->left=NULL;
temp->right=NULL;
if(head==NULL)
{
head=temp;
}
else
{
struct node *curr;
curr=(struct node *)malloc(sizeof(struct node));
curr=head;

while(curr)
{
p=curr;
if(temp->n>curr->n)
{
curr=curr->right;
}
else
{
curr=curr->left;
}

}

if(temp->n>p->n)
{
p->right=temp;
}
else
{
p->left=temp;
}
}
}
int searche(struct node *r,int s)
{
if(s==r->n)
{
printf("%d is found in the position of %d\n",s,&r->n);
}
else if(sn)
{
r->left=searche(r->left,s);
}
else if(s>=r->n)
{
r->right=searche(r->right,s);
}
}

Want your business to be the top-listed Advertising & Marketing Company in Gazipur?
Click here to claim your Sponsored Listing.

Telephone

Address


Gazipur
1702