@Moschops : I am printing variable names just before and after the green highlighted statement. The statement before gets printed but the one after doesn't.When I run gdb , I get seg fault again at the same spot.

@raptr_dflo : This is how :
[CODE]Request R = (Request )malloc(sizeof(Request)) ;[/CODE]
Then I initialize various fields of R and pass it on to initRoomsList

I am declaring a structure as this

[CODE]typedef struct Request
{
deque<int> roomsList ;
}Request;[/CODE]

Then , in some other function I get a segmentation fault in the highlighted line :
[CODE]
int initRoomsList(Request R)
{
int roomSatisfying ;
char roomName[20] ;
int roomNum, capacity,wb,proj, lcd, sound, aud, vid , ac ;
int count = 0;
FILE
fp ;
fp = fopen("rooms.txt","r") ;
while(fscanf(fp,"%d %d %d %d %d %d %d %d %d %s", \
&roomNum,&capacity, &wb,&proj,&lcd,&sound,&aud,&vid,&ac,roomName) != EOF )
{
if(R->capacity > capacity )
continue ;
if(R->wb > wb )
continue ;
if(R->proj > proj)
continue ;
if(R->lcd > lcd )
continue ;
if(R->sound > sound )
continue ;
if(R->aud > aud)
continue ;
if(R->vid > vid )
continue ;
if(R->ac > ac)
continue ;

    // If control is here, that means this room fulfils all conditions .
    cout<<"hi "<<roomNum<<endl ;
    cout<<"hello "<<&(R->roomsList)<<endl ; 
    [B][I][COLOR="Green"](R->roomsList).push_back(roomNum) ;[/COLOR][/I][/B]
    cout<<"bye "<<&(R->roomsList)<<endl ; 
    count++;
}
fclose(fp) ;
if(count==0)
    return 0 ;  
else
    return 1 ;

}
[/CODE]

This is what gets printed on the terminal :
[CODE]hi 0
hello 0x1849010
bye 0x1849010
hi 1
hello 0x1849010
Segmentation fault
[/CODE]

Output of GDB :
[CODE]hi 0
hello 0x60d010
bye 0x60d010
hi 1
hello 0x60d010

Program received signal SIGSEGV, Segmentation fault.
0x0000000000406f1c in __gnu_cxx::new_allocator<int>::construct(int*, int const&) ()
(gdb)
[/CODE]

Please help me out with this!!