Computer Science, asked by gajindergulatipazajl, 1 year ago

differnce between printf() and scanf()

Answers

Answered by P10I
2
scan means to take an perfect image of the page
print means to take out any image or document in reality

gajindergulatipazajl: thanks
P10I: pls mark as brainly
P10I: pls request
Answered by siddhartharao77
12
Short note on printf and scanf in C language:

(1) Printf:

= > It is used to display the output onto the output screen.

= > It is stored in <stdio.h>

= > It returns the number of bytes.

= > Syntax: printf("format string", arguments);


(2) Scanf:

= > It is used to take input from the user. 

= > It is stored in <stdio.h>

= > It does not return anything.

= > Syntax: Scanf("Format string", arguments);




Example:

#include<stdio.h>

void main()
{
int a,b,c;
printf("Enter two numbers");
scanf("%d%d", &a,&b);

c = a + b;
 
printf("Addition is: %d\n",c);
getch();
}


Hope this helps!

siddhartharao77: :-)
gajindergulatipazajl: thanks
siddhartharao77: Welcome!
Similar questions