logo
logo
Sign in

C Input Output (I/O)

avatar
Tech Mekrz
C Input Output (I/O)

The scanf() function reads formatted input from standard input (keyboard) whereas the printf() function sends formatted output to the standard output (screen).

The code execution begins from the start of main() function.

When the compiler encounters printf() function and doesn't find stdio.h header file, compiler shows error.

If the format string matches the argument (testInteger in this case), it is displayed on the screen.

When user enters an integer, it is stored in variable testInteger.

Note the '&' sign before testInteger; gets the address of testInteger and the value is stored in that address.

collect
0
avatar
Tech Mekrz
guide
Zupyak is the world’s largest content marketing community, with over 400 000 members and 3 million articles. Explore and get your content discovered.
Read more