scanf_s is not doing anything when I use Visual Studio 2012

Hi ,, Need your help on this ..I am new to the C programing and wants to learn it and I am doing it on my own ..

#include "stdafx.h"
#include


int main()

{
int x;
printf("Enter any number
");
scanf_s("%d
", &x);

printf("your number is %d
", x);


return 0;
}


This gets compiled without any error but when I executes it .,.

printf works file asking Enter the number
and when I enter suppose 8 .. then I don't get anything , simply blank and cursor keeps jumping on next tile with hot enter ..

Can anyone help ? I know this will be silly .. but I am stuck

thanks
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories