C - Input and Output
Identify the error in the following code snippet:
int x;
printf("Enter a number: ");
scanf("%d", x);
printf("You entered %d", x);int x;
printf("Enter a number: ");
scanf("%d", x);
printf("You entered %d", x);scanf("%d", x); is incorrect because it should use &x to pass the address.x is declared.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions