1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Multiple User Input from single scanf

Discussion in 'C' started by usama_muneeb, Jun 19, 2008.

  1. usama_muneeb

    usama_muneeb Banned

    Joined:
    Mar 7, 2008
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    How do we get multiple user input in a single scanf. Is it OK:

    Code:
    scanf("%f %d", &a, &b);
    ?

    Also, using a switch statement, is it possible to enter all statements in braces except break?

    e.g.

    Code:
    switch ( operator ) {
           case 'S':
           {
           statement;
           statement;
           }
           break;
    }
    
    ?
     

Share This Page