Stack

No comments

#include <iostream>
using namespace std;

struct node {
        int data;
        node *next;
        node *back;
};

No comments :

Post a Comment

Queue

No comments

#include <iostream>
using namespace std;

struct node {
        int data;
       node *next;
       node *back;
};

No comments :

Post a Comment

Initialize an array

No comments

#include<stdio.h>
int main()
{
int A[10];
int i,n,l;
printf("how many elements you want? : ");
scanf("%d",&n);
for(int i=0;i<n;i++)
{
scanf("%d",&A[i]);
}

No comments :

Post a Comment

Different shape

No comments

#include<stdio.h>
int main(){
int a=0;
for(int j=0;j<6;j++){

No comments :

Post a Comment

Bubble Sort

No comments

#include<stdio.h>
int main()
{
for(int c=1;c<=40;c++){
int A[4];int i=0,temp;
for(int i=1;i<=4;i++)
{
printf("%d subject number : ",i);

No comments :

Post a Comment

Constructor and Destructor

No comments

#include<iostream>
using namespace std;


class B{

public:
B(){cout<<"B's constructor\n";}
~B(){cout<<"B's destructor\n";}
};
class C{

No comments :

Post a Comment

Creating object

No comments

#include<iostream>
using namespace std;


class myclass
{
int a,b;
public:

No comments :

Post a Comment

Profile Of a student

No comments

#include<iostream>
#include<cstring>
using namespace std;
class student
{
char A[100],B[100];
int id;
char sec[100];
int age;

No comments :

Post a Comment

Virtual

No comments

#include<iostream>
using namespace std;


class area
{
double dim1,dim2;
public:

No comments :

Post a Comment

Basic C++

No comments

#include<iostream>
using namespace std;


class myclass
{
int a;
public:

No comments :

Post a Comment

Calculator using C++

No comments

#include<iostream>
#include<conio.h>
using namespace std;

class calculator
{
int a;
int b;

No comments :

Post a Comment

Tennis using C++

No comments

#include<iostream>
using namespace std;
class tennis
{

No comments :

Post a Comment

Queue using C++

No comments

#include<iostream>
using namespace std;

class Queue
{
int *a;
int front;
int rear;
int size;
public:

No comments :

Post a Comment

Stack using C++

No comments

#include<iostream>
using namespace std;

class Stack
{
int *a;
int tos;
int size;
public:

No comments :

Post a Comment

Smile .........

No comments

#include<stdio.h>
int main()
{
int a=2,b=1,c;
int *p=&a,*q=&b;
c=*p-*q;
printf("\t%c\t",c);
printf("%c\t",c);
printf("%c\t",c);
printf("%c\t",c);
printf("%c\t",c);
printf("%c\t",c);



printf("\n");
}

No comments :

Post a Comment

reverse of a string (2)

No comments

#include<stdio.h>
void boss(char *p)

{char a;
int i,j;


for(j=0;p[j]!='\0';j++)
           {
            for(i=0;i<j;i++)
           {
                 a = p[i];
                 p[i]=p[j];
                 p[j]=a;
  }
}

No comments :

Post a Comment

Reverse of a srting using C language

No comments

#include<stdio.h>

int string_length(char*);
void reverse(char*);

int main()
{
   char string[100];

   printf("Enter a string\n");
   gets(string);

   reverse(string);

   printf("Reverse of entered string is \"%s\".\n", string);

   return 0;
}

No comments :

Post a Comment

Pyramid Shape with C language

No comments

#include<stdio.h>
int main()
{
int n;
printf("enter your line number: \n");
scanf("%d",&n);
for(int i=1;i<=n;i++)

No comments :

Post a Comment

Pow program using C language

No comments

#include<stdio.h>
#include<math.h>
void boss(float x,int n);
int main()
{
int n;
float x;
printf("enter your value:  ");
scanf("%f", &x);
printf("enter your number:  ");
scanf("%d", &n);

boss(x,n);

No comments :

Post a Comment

Maximum-Minimum using pointer

No comments

#include<stdio.h>
void main( void )
{
int i ,m, q;
int *j , *k,*l;
j = &i;
k=&m;l=&q;

printf("Insert first  number: ");
scanf("%d", j);
printf("\nInsert second number: ");
scanf("%d", k);
printf("\nInsert third  number: ");
scanf("%d", l);
printf("\n");

No comments :

Post a Comment

Matrix using C language

No comments

#include<stdio.h>
int main()
{
int A[3][3];
printf("enter your [3]*[3]matrix =9 elements: \n");
for(int i=0;i<3;i++)
{
for(int j=0;j<3;j++)
{
scanf("%d",&A[i][j]);
}
}
printf("\n your matrix is: \n");
for(int i=0;i<3;i++)
{
for(int j=0;j<3;j++)
{
printf("%d ",A[i][j]);
}printf("\n");
}

No comments :

Post a Comment

Matching Two String using Pointer

No comments

#include<stdio.h>
void boss(char *l,char *m)
{
int i=0,j=0;
while (*(l+i)!='\0' && *(l+j)!='\0')
{
if ((*(l+i)==*(m+j))||(*(l+i)==' '&&*(m+j)==' ' ))
{
i++;j++;}
else{
break;

No comments :

Post a Comment

count (Wrd & Chr) with function+pointer

No comments

#include<stdio.h>
int main()
{
char A[]={"Bangladesh is The Best Team"};
char *p=A;
int character=0,word=0;
for(int i=0;A[i]!='\0';i++)
{

No comments :

Post a Comment

1+1+3+1+3+5 shape program with c language

No comments

#include<stdio.h>
void series(int num);

int main(void)
{

int n;
printf("enter your number : ");
scanf("%d", &n);
printf("\n");
series(n);


return 0;
}

No comments :

Post a Comment

1.12.123.1234 shape with C language including function

No comments

#include<stdio.h>
void fact(int num);

int main(void)
{

int n;
printf("enter your number : ");
scanf("%d", &n);
fact(n);


return 0;
}

No comments :

Post a Comment

Star program with C language (4)

No comments


#include<stdio.h>
int main()
{
    int n;
    printf("Enter your number : ");
    scanf("%d",&n);
    printf("\n");
    for(int i=0;i<n;i++)
    {
        for(int j=0;j<i;j++)
        {
            printf(" ");
        }

No comments :

Post a Comment

Star program with C language (3)

No comments

#include<stdio.h>
int main()
{
int n;
printf("Enter your number :  ");
scanf("%d",&n);
printf("\n");
for(int i=0;i<n;i++)
{

No comments :

Post a Comment

Star program with C language (2)

No comments

#include<stdio.h>
int main()
{
int n;
printf("Enter your number :  ");
scanf("%d",&n);
printf("\n");
for(int i=0;i<n;i++)
{

No comments :

Post a Comment

Star program with C language

2 comments

#include<stdio.h>
int main()
{
int n;
printf("Enter your number :  ");
scanf("%d",&n);
printf("\n");
for(int i=0;i<n;i++)
{

2 comments :

Post a Comment