#include
#include
main()
{
int i;
char c, text[30];
float f;
printf(\"\\nEnter Integer : \");
scanf(\"%d\",&a
When you type 42 (or whatever) as the first integer, you actually type three characters: 4, 2 and then the newline character that comes from pressing ENTER. Your first scanf reads an integer, which means that it only reads the 4 and the 2, leaving the newline character in the input buffer.
When your program gets to gets, it reads a the very short line that consists just of that newline character.
You can fix it by reading and throwing away the newline character just after scanf, something like this:
printf("\nEnter Integer : ");
scanf("%d",&i);
while (getchar() != '\n')
;