Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in attempting to compile Generic swap function program....  RSS feed

Shankar Salunkhe
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Can you please help me to solve the problem.

I am trying to swap the user input.......however, if i want to swap numbers then we write a code as - scanf("%d",a);

Here i need to specify in the code %d for integer values input........what if i want to give the input number or character so that the program will dynamically accept either integer or character values and do the swapping.

Shankar Salunkhe
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!