array keeps bringing garbage value while it should be empty.following is my
     /*
    Name: Hotel Room Reservation 
    Author: Ali Naseem, M. Abbas, M. Hammad, Raza Zaidi
    Date: 23-08-16 01:20
    Description: This software is about reserving a room in hotel. User will provide its information and his requirement after which software will reserve a room for him. 
*/
    #include <iostream>
    #include <cstring>
    using namespace std;
    int n=0,j=0,k=0,l=0,c=1,r=1;
    void customer();
        void roomType();
    void admin();
        void status();
        void bill();
    struct credentials{
        string user, pass, USER, PASS;
        }cr = {} ;
    struct rooms         //Stucture Variables for Room Details
    {
        int roomT, noRoom[30], confirm=0;
        int roomId[3][10]={{}};
        int singleR[10] = {101,102,103,104,105,106,107,108,109,110};
        int doubleR[10] = {111,112,113,114,115,116,117,118,119,120};
        int suitR[10]   = {121,122,123,124,125,126,127,128,129,130};
    } room;
    struct custDet       //Stucture Variables for Customer Details
    {
        string name[30]={""};
    int cnic[30], ID[30], noPer[30], day[30];   
} guest;
void customer()      //Customer Module 
{
    bool keep=true;
    int opt;
    while(keep)
    {
        if(k>10 && j>10 && l>10)
        {
            cout<<"\nSorry We dont have any room available";
            goto skipCust;
        }
        cout<<"\nEnter Your Full Name: ";
        cin.ignore();
        getline(cin,guest.name[n]);
        cout<<"\nEnter Your CNIC Number: ";
        cin>>guest.cnic[n];
        cout<<"\nNumber Of Rooms Required: ";
        cin>>room.noRoom[n];
        roomType();
        if(room.roomT==0)
        {
            goto skipCust;
        }
        cout<<"\n\nPlease Enter The Numbers of Persons Will Stay: ";
        cin>>guest.noPer[n];
        cout<<"\nNumber of Days To Stay: ";
        cin>>guest.day[n];  
        invalid:
        cout<<"\n\nPress 1 To Add More Coustomers or 0 To Go To Previous Menu: ";
        cin>>room.confirm;
        if(room.confirm==1)
        {
            keep=true;
        }
        else if(room.confirm==0)
        {
            keep=false;
        }
        else
        {
            cout<<"'\nInvalid Selection.";
            goto invalid;
        }
    }
    skipCust:;
}
void roomType()             //Reservation Module
{
    bool keep=true;
    while(keep)
    {
        cout<<"\nFollowing is the list of types of Room:"<<endl<<endl;
        cout<<"Code\tRoom Type  \tFares (Per Day)"<<endl;
        cout<<"1-  \tSingle Room\t1000"<<endl;
        cout<<"2-  \tDouble Room\t1500"<<endl;
        cout<<"3-  \tSuit       \t3000"<<endl<<endl;
        cout<<"(Press 0 to go back)"<<endl;
        cout<<"\nSelect Your Room Type: ";
        cin>>room.roomT;
        if(room.roomT==1)
        {
            room.roomId[1][c]=room.singleR[j];
            cout<<"\nYour Room No. is: "<<room.roomId[1][c];
            n++;
            j++;
            c++;
            keep=false;
        }
        else if(room.roomT==2)
        {
            room.roomId[2][c]=room.doubleR[k];
            cout<<"\nYour Room No. is: "<<room.roomId[2][c];
            n++;
            k++;
            c++;
            keep=false;
        }
        else if(room.roomT==3)
        {
            room.roomId[3][c]=room.singleR[l];
            cout<<"\nYour Room No. is: "<<room.roomId[3][c];
            n++;
            l++;
            c++;
            keep=false;
        }
        else if(room.roomT==0)
        {
            keep=false;
        }
        else
        {
            cout<<"\nInvalid Selection";
        }
    }
}
void admin()        //Admin Module
{
    int opt;
    bool keep=true;
    if(cr.USER.empty())   //To set Login credentials
    {
        cout<<"\nSIGN UP";
        cin.ignore();
        cout<<"\nUser: ";
        getline(cin,cr.user);
        cr.USER=cr.user;
        cout<<"\nPass: ";
        getline(cin,cr.pass);
        cr.PASS=cr.pass;
    }
    else                 //If Login credentials are already set
    {
        cout<<"\nSIGN IN";
        cin.ignore();
        cout<<"\nUser: ";
        getline(cin,cr.user);
        cout<<"\nPass: ";
        getline(cin,cr.pass);
    }
    if((cr.user==cr.USER) && cr.pass==cr.PASS)
    {
        cout<<"\nSigned In Successfully";
    }
    else
    {
        cout<<"\nusername or password is incorrect Try Again";
    }
    while(keep)
    {
        cout<<"\nRooms Status     \t(Press 1)";
        cout<<"\nBill             \t(Press 2)";
        cout<<"\nFor Previous Menu\t(Press 0)"<<endl;
        cout<<"Choice: ";
        cin>>opt;
        if(opt==1)
        {
            status();
        }
        else if (opt==2)
        {
            bill();
        }
        else if (opt==0)
        {
            keep=false;
        }
        else
        {
            cout<<"\nInvalid Selection";
            keep=true;
        }
    }
}
void status()           //Status Module
{
    int opt;
    bool keep=true;
    while(keep)
    {
        cout<<"\nSelect the room for there status:";
        cout<<"\nCode\tRoom Type"<<endl;
        cout<<"1-  \tSingle Room"<<endl;
        cout<<"2-  \tDouble Room"<<endl;
        cout<<"3-  \tSuit       "<<endl<<endl;
        cout<<"(Press 0 to go back)"<<endl;
        cout<<"\nSelect Your Room Type: ";
        cin>>opt;
        if(opt==1)
        {
            cout<<"\nRoom\tStatus\n";
            for(int i=1; i<=10; i++ )
            {
                if(room.roomId[1][i]>0)
                {
                    cout<<room.roomId[1][i]<<"\t Occupied\n";
                }
            }
        }
        else if(opt==2)
        {
            cout<<"\nRoom\tStatus\n";
            for(int i=1; i<=10; i++ )
            {
                if(room.roomId[2][i]>0)
                {
                    cout<<room.roomId[2][i]<<"\t Occupied\n";
                }
            }
        }
        else if(opt==3)
        {
            cout<<"\nRoom\tStatus\n";
            for(int i=1; i<=10; i++ )
            {
                if(room.roomId[3][i]>0)
                {
                    cout<<room.roomId[3][i]<<"\t Occupied\n";
                }
            }
        }
        else if(opt==0)
        {
            keep=false;
        }
        else
        {
            cout<<"\n Invalid Choice";
            keep=true;
        }
    }
}
void bill()
{
    int opt;
    cout<<"\nThis is Bill Module";
    cout<<"\nPress 0 to go back to previous menu";
    cin>>opt;
}
int main()
{
    int opt;
    bool keep = true;
    while(keep)
    {
    cout<<"\n*************************"<<endl;
    cout<< " Hotel Room Reservation "<<endl;
    cout<<"*************************"<<endl;
    cout<<"Customer (Press 1)"<<endl;
    cout<<"Admin    (Press 2)"<<endl;
    cout<<"Exit     (Press 0)"<<endl;
    cout<<"Choice: ";
    cin>>opt;
    if(opt==1)
    {
        customer();
    }
    else if(opt==2)
    {
        admin();
    }
    else if(opt==0)
    {
        cout<<"Invlid Selection"<<endl;
        keep=false;
    }
    else
    {
        cout<<"Invalid Selection"<<endl;
    }
    }
    cout<<endl;
    return 0;
}
problem is with the following lines
        if(opt==1)
        {
            cout<<"\nRoom\tStatus\n";
            for(int i=1; i<=10; i++ )
            {
                if(room.roomId[1][i]>0)
                {
                    cout<<room.roomId[1][i]<<"\t Occupied\n";
                }
            }
        }
        else if(opt==2)
        {
            cout<<"\nRoom\tStatus\n";
            for(int i=1; i<=10; i++ )
            {
                if(room.roomId[2][i]>0)
                {
                    cout<<room.roomId[2][i]<<"\t Occupied\n";
                }
            }
        }
        else if(opt==3)
        {
            cout<<"\nRoom\tStatus\n";
            for(int i=1; i<=10; i++ )
            {
                if(room.roomId[3][i]>0)
                {
                    cout<<room.roomId[3][i]<<"\t Occupied\n";
                }
            }
        }
room.roomId[1][i] is empty but room.roomId[2][i] and room.roomId[3][i] brings some garbage value. i could share my whole source code if u need.
this array is supposed to take values from another variable but how can it takes values without assigning it to him.
 
     
    