Computer Science, asked by parasb313, 7 months ago

conion is defined as_____?
A. connect input output header file
B. console input output header file
C. console output header file
D. console input header file​

Answers

Answered by anglo71
0

Answer:

Input means to provide the program with some data to be used in the program and Output means to display data on screen or write the data to a printer or a file.

C programming language provides many built-in functions to read any given input and to display data on screen when there is a need to output the result.

In this tutorial, we will learn about such functions, which can be used in our program to take input from user and to output the result on screen.

All these built-in functions are present in C header files, we will also specify the name of header files in which a particular function is defined while discussing about it.

scanf() and printf() functions

The standard input-output header file, named stdio.h contains the definition of the functions printf() and scanf(), which are used to display output on screen and to take input from user respectively.

#include<stdio.h>

void main()

{

// defining a variable

int i;

/*

displaying message on the screen

asking the user to input a value

*/

printf("Please enter a value...");

/*

reading the value entered by the user

*/

scanf("%d", &i);

/*

displaying the number as output

*/

printf( "\nYou entered: %d", i);

}

When you will compile the above code, it will ask you to enter a value. When you will enter the value, it will display the value you have entered on screen.

You must be wondering what is the purpose of %d inside the scanf() or printf() functions. It is known as format string and this informs the scanf() function, what type of input to expect and in printf() it is used to give a heads up to the compiler, what type of output to expect.

Format String Meaning

%d Scan or print an integer as signed decimal number

%f Scan or print a floating point number

%c To scan or print a character

%s To scan or print a character string. The scanning ends at whitespace.

We can also limit the number of digits or characters that can be input or output, by adding a number with the format string specifier, like "%1d" or "%3s", the first one means a single numeric digit and the second one means 3 characters, hence if you try to input 42, while scanf() has "%1d", it will take only 4 as input. Same is the case for output.

In C Language, computer monitor, printer etc output devices are treated as files and the same process is followed to write output to these devices as would have been followed to write the output to a file.

NOTE : printf() function returns the number of characters printed by it, and scanf() returns the number of characters read by it.

int i = printf("studytonight");

In this program printf("studytonight"); will return 12 as result, which will be stored in the variable i, because studytonight has 12 characters.

please follow me and like please

Answered by IIRissingstarll
3

\huge\sf\fbox\orange{QuEsTiOn}

conion is defined as_____?

\huge{\underline{\mathtt{\red{✯a}\pink{n}\green{s}\blue{w}\purple{e}\orange{r✯}}}}

B. console input output header file

\large{\underline{\sf{\pink{ Drop \:  some \: }{\red{♡} }}}}

Similar questions