Thursday, July 17, 2014

Insert in Queue

#‎include‬
using namespace std;
int main()
{
cout<<"Insert element in a quee: source Code"<<endl;
int a[5]={1,2,3,4},i,item=5;

for(i=0;i<5;i++)
{
if(a[i]=='\0')
{
a[i]=item;
}
}
for(i=0;i<5;i++){
cout<<a[i]<<endl;
}
return 0;
}

1 comment:

  1. #‎include‬
    using namespace std;
    int main()
    {
    cout<<"Insert element in a quee: source Code"<<endl;
    int a[5]={1,2,3,4},i,item=5;

    for(i=0;i<5;i++)
    {
    if(a[i]=='\0')
    {
    a[i]=item;
    }
    }
    for(i=0;i<5;i++){
    cout<<a[i]<<endl;
    }
    return 0;
    }

    ReplyDelete