Variable assignment in C Vs scanf : I am new to C got a small problem in understanding below scanf line

    printf("Enter a message to add to message queue : ");    
`scanf("%[^\n]",sbuf.mtext);`



how do I write this statement if I am getting the value from command line?
I think I would have to declare the variable as string?

Thanks in advance.