scanf: scanf is a built-in function to read input from the user.
to write and read the values
Printf returned no. of character receive . scanf return no of variable to be inputed according to format specifier . eg: i=printf("thisisc") printf("%d",i); //i=7 j=scanf("dd",&a,&b,&c,&d); printf("%d",j); IT IS MOST APPROPRIATE ANSWER FOR THIS Q .......... PLZ DO Practically............
The scanf() function in the <stdio.h> C standard library header.
cause getchar only read a character and scanf read only word before first space but not other words and letters.
Examples: recv, read, fread, gets, fgets, scanf, fscanf
To read input from standard input.
scanf();
scanf: scanf is a built-in function to read input from the user.
to write and read the values
define the array lets say main() { int x[100]; for (int i=0;i<x;i++) scanf("%d",&x[i]); } this way ull scan 100 characters if that is what you mean...if you need to print them a similar printf loop can be made
Printf returned no. of character receive . scanf return no of variable to be inputed according to format specifier . eg: i=printf("thisisc") printf("%d",i); //i=7 j=scanf("dd",&a,&b,&c,&d); printf("%d",j); IT IS MOST APPROPRIATE ANSWER FOR THIS Q .......... PLZ DO Practically............
They do different things, read the manual/help for details.
The scanf() function in the <stdio.h> C standard library header.
cause getchar only read a character and scanf read only word before first space but not other words and letters.
The question is unclear. Many things about characters are important in a story. If the characters are not believable, the reader won't care about them, and won't read the story.
%c and %s are format characters used for input and output. These are mainly used in scanf and printf statements. %c is used for characters while %s is used for strings. For input, it is used to specify the type of the value to be read while for output, it is used to specify the type of the value to be printed.