answersLogoWhite

0

scanf is a function, not a statement. Example:

int a;

char name[12];

scanf ("%d %s", &a, &name[0]);

User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What happens by the scanf statement in c?

It's a function, not a statement. Use your help system to find out its purpose.


What is the syntax of scanf?

scanf: scanf is a built-in function to read input from the user.


Can you use scanf function within printf function?

Yes: double d; printf ("scanf's just returned %d\n", scanf ("%lf", &d));


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.


What are the header file of scanf function?

stdio.h


What is the use of scanf function in c?

Hiii,scanf() is an predefined function of C to getting runtime input from the user.Syntax:-scanf("sequence specifier",&variable_name);example:-#includevoid main(){int number;printf("\n Enter any number"); //message to userscanf("%d",&number); //getting input from userprintf("\n entered number is %d",number); // displaygetch();}


Scanf function in c for strings?

Use '%s', eg: char name[64]; scanf ("%s", name);


What is return type of scanf function?

Use the help/manual.


What is scanF function?

scanf() is an input function which reads input from the standard input devices such as keyboard. Syntax: scanf("Control Character",address_list); where control character is a sequence of one or more character such as %d,%f,%lf,%lld. Address list specifies the variables, pointers etc. e.g. scanf("%d",&num);


Is there a function similar to the C plus plus scanf function in JavaScript?

Scanf is part of the C standard library. Although the C++ standard library includes 18 headers from the ISO C90 standard, their usage in C++ is deprecated. However, to answer the question, there is no equivalent to scanf in JavaScript.


What is the use of printf and scanf function?

Printf prints something to the standard output stream, and scanf inputs something from the standard input stream.


Which function is used to read data from the console?

The scanf() function in the <stdio.h> C standard library header.