How to receive strings with spaces in scanf()

Answer Posted / valli

char a[50];
use scanf(" %[^\n]",a);

Is This Answer Correct ?    10 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to introdu5ce my self in serco

1535


What are two dimensional arrays alternatively called as?

676


Explain what are the standard predefined macros?

661


What does nil mean in c?

683


Explain two-dimensional array.

637






what is uses of .net

1281


What is the difference between malloc() and calloc() function in c language?

614


What is difference between union All statement and Union?

642


What will the code below print when it is executed?   int x = 3, y = 4;         if (x = 4)                 y = 5;         else                 y = 2;         printf ("x=%d, y=%d ",x,y);

1367


4. main() { int c=- -2; printf("c=%d",c); }

1375


What are the characteristics of arrays in c?

622


What is c standard library?

700


What is the difference between int main and void main in c?

601


What does c value mean?

641


What are compound statements?

641