Input and Output in C Language

STANDARD INPUT AND OUTPUT






printf()






Example 


#include <stdio.h>
Main()
{
   printf(" C Language");
};

Output : C Language



scanf()


scanf() in c,what is scanf function in c



EXAMPLE--

#include <stdio.h>
int main()
{
int test;
printf("enter an integer ");
scanf("%d", & test);
prinft(" number = %d", test);
return 0;
}

Output


Enter an integer 5
Number = 5

The scanf() function reads formatted input from the keyboard. When user enters an integer, it is stored in variable test. Note the '&' sign before test; gets the address of test and the value is stored in that address.


Comments

Popular posts from this blog

Campus and Interview preparation with Java

Important Program of C language in O level exam january 2019

O LEVEL- IT TOOLS & BUSINESS SYSTEM