Describe the code
#include<stdio.h>
#include<string.h>
#include<conio.h>
void main()
{
intx(12);
scanf(%d%");
Answers
#include<stdio.h>
stdio stands for standard Input Output. It is header file in C which has definitions for input/output related functions , whenever you using built-in functions like printf(), scanf(), getc(), putc() etc. then you have to specify “stdio.h” header file in your program.
#include<string.h>
_________________________
#include<conio.h>
conio stands for console input output. It is a header file in C which has definitions for console related functions, whenever you using built-in functions like clrscr(), getch() etc. then you have to specify “conio.h” header file in your program.
___________________________
#include <stdio.h>
/*this is the function to compute the absolute value of a whole number.*/
int abs(int x)
{
if (x>=0) return x;
else return -x;
}
/*this is the program that uses twice the function defined above.*/
int main()
{
int x, y;
printf("Type the coordinates of a point in 2-plane, say P = (x,y). First x=");
scanf("%d", &x);
printf("Second y=");
scanf("%d", &y);
printf("The distance of the P point to the x-axis is %d. \n Its distance to the y-axis is %d. \n", abs(y), abs(x));
return 0;
}
standard input output.........