answersLogoWhite

0


Best Answer

scanf ("%[^\n]s", sentence);

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: C program to accept a sentence using scanf?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

A sentence using the word accept?

The student learned to accept their peers for who they are.


How do you make sentence using the word accept?

I accept your proposal to work on this project together.


Why and is not using ' and ' in reading a string using scanf?

I guess you wanted to ask, why is it scanf ("%s", array)and not scanf ("%s", &array).Well, array is by definition a pointer to the first element: array = &array[0]


Can you give me a sentence using word program?

I love this program so much. This program is amazing.


Write program using c programig to convert uppercase to lower case?

#include <stdio.h> int main() { int n; char ch; scanf("%d", &n); { scanf("%c", &ch); ch-=32; } printf("%c", ch); return 0; }


Can you make a sentence using the word accept?

I need to accept the fact that things didn't go as planned.


What happens by the 'scanf' statement in C programming language?

By using the scanf statement in c,we can take the values at run time . for ex a is a variable of type int so, we can assign the value of a using scanf at run time as follows. scanf("%d",&a); here %d is the conversion specifier for integer type.


How can we read two strings using c program?

#include,stdio.h>main(){char string1[20],string2[20]printf("enter the first string");scanf("%s",string1);// reading the string1printf("enter the second string");scanf("%s", string2);// reading the the string2printf( "the first string is %s",string1);// printing the string1printf("the second string is %s",string2);// printing the string2}the problem of using scanf is that it does not take space. so we can use gets for it.ie instead of scanf("%s",string1); we can use gets(string1); .


What is a sentence using sorrowful?

Please accept this expression of sorrow for the fact that I am unable to answer this question.


How do you read input buffer of keyboard using C?

scanf();


Can you give me a sentence using biography?

Example sentence - Last night we watched a biography program about his life.


A sentence using the word minimum?

the minimum score to get into the program was 45/50