C : scanf scanset

Dear All,

i need a help regards input this string .

*As&%hish}] {Roy : whitespace also included in this .

To input this text using scanset %[] how can i use scanf to input the data into a character array ?

Thanks and Regards,

Ashish

Comments

  • : Dear All,
    :
    : i need a help regards input this string .
    :
    : *As&%hish}] {Roy : whitespace also included in this .
    :
    : To input this text using scanset %[] how can i use scanf to input
    : the data into a character array ?
    :
    : Thanks and Regards,
    :
    : Ashish
    :

    i found it , its

    scanf("%[^
    ]s",variablename);

    here the character ^ says dont stop till you get
    . thus white space which is generally ignored is also fed into the system .

    Thanks everybody
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion