answersLogoWhite

0


Best Answer

The scanf() function is a commonly used function to input information during the execution of a program. scanf() function has its prototype in the stdio.h header file.

To accept and display a number:

int num;

printf("Enter a number: ");

scanf("%d",&num);

printf("You entered %d",num);

To accept and display a character, replace %d with %c and make num a character variable [char].

Plus: gets, fgets, read, fread, getchar, getc, fgetc, getch...

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What function enables the user to input information while the program is being executed in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is a graphic representation that is often a small image on a button that enables you to run a program or program function?

Icon


When does program become a process?

When it is executed.


What is function in oop?

A function is a block of code that has a name and it has a property that it is reusable i.e. it can be executed from as many different points in a C Program as required.Function groups a number of program statements into a unit and gives it a name. This unit can be invoked from other parts of a program. A computer program cannot handle all the tasks by it self. Instead its requests other program like entities - called functions in C - to get its tasks done. A function is a self contained block of statements that perform a coherent task of same kindThe name of the function is unique in a C Program and is Global. It neams that a function can be accessed from any location with in a C Program. We pass information to the function called arguments specified when the function is called. And the function either returns some value to the point it was called from or returns nothing.We can divide a long C program into small blocks which can perform a certain task. A function is a self contained block of statements that perform a coherent task of same kind.Structure of a FunctionThere are two main parts of the function. The function header and the function body.int sum(int x, int y){int ans = 0; //holds the answer that will be returnedans = x + y; //calculate the sumreturn ans //return the answer}


Which function is supported by an application program?

which function is support by an application program


What are its program components?

the main() function,the#include Directive, the variable definition. function prototype, program statements, the function definition,program comments and braces are the components of program in C++

Related questions

What is the function of the program counter register?

The function of the program counter register is to hold the address of the instruction that is being executed and (later) to hold the address of the instruction that will be executed next.


Where is the fuction call of main function?

The main function is the entry point into a program. When the Operating System launches the program the main function gets executed.


What is a main function in c plus plus?

It is the first function that gets called when the program is executed.


Why there is one main function in c?

Because that's what is executed when you run the program.


What is a graphic representation that is often a small image on a button that enables you to run a program or program function?

Icon


What is Function of loader in system software?

Whenever the assembly program is to be executed, it has to be assembled again; Programs ...loads the first program to be run by the computer -- usually an operating system ...


What are the uses of excel?

Exel is a spreadsheet program that enables you to enter formulas and data into the cells in order to organize information.


What are some of the features of the Quickbooks Customer Manager program?

The main function of the Quick books Customer Manager program is so that a company can easily organise customer data, which enables you to keep track of your customers.


What is the function of program counter?

program counter is a register that has the address of next instruction that has to be executed after currently executing instruction. it is used for proper execution of functions of computer by providing address of next instruction to microprocessor.


When does program become a process?

When it is executed.


What is exactly a logfile?

A log file is automatically created by programs to store information about the actions performed by that program. It is usually a text file stating either operations of the program or the errors encountered while the program was executed.


How high level program is executed?

High-level programs cannot be executed directly, they must be compiled in advance of execution, or interpreted by a runtime program.