Sorry about that. I expected to give a simple title and an example hoping that i could make it clear to you. I will give an expanded question then.

Suppose I have a code
Code:
#include<stdio.h>
void test
{
    char a[10];
    printf("Read a string : ");
    gets(a);
}
main()
{
    int x;
    printf("Enter a number : ");
    scanf("%d",&x);
    test();
}
Suppose we execute the above code.


Running it
Code:
smp@debian$: gcc <filename> -o output
smp@debian$: ./output
Now I should be able to read an integer as well as a string.
The output of executing the program

Code:
Enter a number : 10                         #Number could be read.
Read a string :                                 #String could not be read. It just went past without waiting for an input.

This is the problem. I hope you can understand it now. And sorry about the title. I thought of posting the problem but then it would turn out too big and when I thought of editing it, i couldnt edit a thread. Sorry about that

Thanks for your help