Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

scanf_s is not doing anything when I use Visual Studio 2012

abroshanabroshan Posts: 3Member
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

Comments

Sign In or Register to comment.