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

Differentiate between full, complete & perfect binary trees.

678


Explain that why C is procedural?

662


What is union and structure in c?

624


in iso what are the common technological language?

1639


How to write c functions that modify head pointer of a linked list?

548






What is the difference between the local variable and global variable in c?

537


What is a lookup table in c?

631


What does & mean in scanf?

606


What is a 'null pointer assignment' error?

731


Is the exit() function same as the return statement? Explain.

668


Tell me what is the purpose of 'register' keyword in c language?

624


What is 1f in c?

1845


When c language was developed?

644


How does placing some code lines between the comment symbol help in debugging the code?

550


What does #pragma once mean?

693