Thursday, March 17, 2016

First program: Learn how to print something in C, How to compile and run program?

Aim : To print What you want.

As we discuss in last post (Comments in C language), we'll see in this program about single line comment.

Main aim of this program: To gain small idea about how to use printf function in C.

Program to print "Hi, Honey".

How to compile and run Program ???
Press Alt+F9 on your keyboard to compile program.
Press Ctrl+F9 on your keyboard to run program.

When you compile program :

When you Run program :

See syntax of printf function is printf("");
Example:

Code:
 printf("Hi, Honey");

Output of code:
Hi, Honey

To get more about printf function this post is more suitable for you: Introduction to printf() and Scanf() Functions
In that post you will see some detailed description of printf function and scanf functiom, you can also see use of multi line comment.

No comments: