Posts

Showing posts with the label Printing in C language

Printing in C programming

Image
Printing in C In C for printing purpose, We Use A Function Called printf( ) . A function is a small program used to perform a specific task. The function receives some input known as an argument and produces some output called return value. Functions are always suffixed with parenthesis ( ). Syntax of printf( ) printf("Control String",[List or Variable]); Note: Control string is a sequence of characters which you want to print. ([ ]) square brackets around the list or variable represent that it is optimal. Example Of printf( ) printf("hello"); //Print hello int a=5,b=6; printf("a=%d b=%d",a,b); //print the value of a and b. int a=5,b=6; //Varialbe Declaration printf("%d",a+b); //Print 11. Note: In printf( ) expression can be written .The example is given above. The first program, Say Hello World in C programming /*program to print the "Hello world"*/ #include<stdio.h> int main() { printf(

Popular posts from this blog

String in golang

Inline V/S Block Level Element

Floating point Data types in Go lang

Escape Sequence | Formatted Printing | Interview Questions

Sum of two numbers

Operators in C Language| Part-4

Printing in C programming

Arrays in C Language

Program to check a year is leap year or not.

Data types in Java