0 votes
70 views
in C program by (1.7k points)
edited

What is wrong in this statement? scanf(“%d”,whatnumber);

1 Answer

0 votes
by (1.7k points)
selected by
 
Best answer
An ampersand & symbol must be placed before the variable name whatnumber. Placing & means whatever integer value is entered by the user is stored at the “address” of the variable name. This is a common mistake for programmers, often leading to logical errors.

Related questions

0 votes
1 answer 203 views
+1 vote
1 answer 141 views
0 votes
1 answer 104 views
0 votes
1 answer 142 views

Doubtly is an online community for engineering students, offering:

  • Free viva questions PDFs
  • Previous year question papers (PYQs)
  • Academic doubt solutions
  • Expert-guided solutions

Get the pro version for free by logging in!

5.7k questions

5.1k answers

108 comments

537 users

...