Search:

Type: Posts; User: Click_here

Search: Search took 0.01 seconds.

  1. In the context of scanf - When you put a '*'...

    In the context of scanf - When you put a '*' after the %, it will read the input and do nothing with it

    i.e.


    scanf("%d%*c", &choice);


    %d - This would read the first input part as a...
  2. scanf("so you wan to be... %d \n", &choice); ...

    scanf("so you wan to be... %d \n", &choice);


    should be more like


    puts("so you wan to be...");
    scanf("%d%*c", &choice); // (%*c for when the user hits enter)
Results 1 to 2 of 2