Friday, January 10, 2020

Push Operation
Top
Pop Operation
Top

Stack Data Structure

Friday, October 11, 2019

c++

C
CPP
#include<iostream>
#include<conio.h>
#include<string.h>
 using namespace std;
  int BinToDec(char bin[])
    {
     int dec=0,base=1,temp,len,i=0;
      for(i=strlen(bin)-1;i>=0;i--)
       {
        temp=int(bin[i])-48;
         dec=temp*base+dec;
        base*=2; 
    }
     return dec;
 }
   int main()
    {
     char bin[7];
     cout<<"Enter a binary No.:-";
     cin>>bin;
     int bn=BinToDec(bin);
     cout<<"Decimal No.="<<bn;
     getch();
    }
#include<stdio.h>
#include<string.h>
   /* char* Delete(char str[],int p)
  {
    	int i;
    	for(i=p-1;i<strlen(str);i++)
  	   	 str[i]=str[i+1];
		return str;
	}*/
	void Delete(char str[],int p)
     {
    	int i;
    	for(i=p-1;i<strlen(str);i++)
  	   	 str[i]=str[i+1];
	}
 int main()
  {
  	char str[100],*str1,ch;
	int i,j,length;
  	printf("Enter a string:-");
  	scanf("%s",str);
  	printf("Enter the character you want to delete a character:-");
  	fflush(stdin);
    scanf("%c",&ch);
    printf("Before deletion  = %s\n",str);
    length=strlen(str);
    for(i=0;i<length;i++)
       {
       	  if(str[i]==ch)
       	     {
       	     	for(j=i;j<length;j++)
  	   	        str[j]=str[j+1];
       	     	break;
			 }
	   }
	if(i==length)
	    printf("given character is not present.");
    else
        printf("After deletion  = %s\n",str);
    return 0;
  }

Monday, September 2, 2019



  • P
  • R
  • A
  • K
  • A
  • S
  • H

Sunday, August 25, 2019




#include<iostream>
#include<string.h>
#include<iomanip>
 using namespace std;
  int HexaToDec(char *ch)
 {
     int i,base=1,temp,dec=0;
     i=strlen(ch)-1;
         while(i>=0)
         {
             if(ch[i]>='A'&&ch[i]<='F')
              temp=int(ch[i])-55;
              else
               temp=int(ch[i])-48;
            dec+=temp*base;
            base*=16;
            i--;
         }
       return (dec);
 }
 int main()
  {
    char ch[3]="1A";
    cout<<"Enter a Hexadecimal number:-";
    char hexa[100];
    cin>>hexa;
 cout<<endl<<HexaToDec(hexa);
   return 0;
  }

Saturday, July 20, 2019

Mathematical Calculation

Friday, February 8, 2019

Calculator


This is My Calculator

Tuesday, January 29, 2019



  1. The preprocessor of a computer can understand only   instructions.
  2. can be translated into machine code by compiler.
  3. is the business oriented language.
  4. We you symbol at the beginning and end of a C program.
  5. Two section of a program are connected by .