Home

A program to print declare variables

C Programming Language 002

The following code shows how to write a program to print declare variables for integer, floating point and character datatype.

Program

#include <stdio.h>

void main()
{
    int a = 2;
    float b = .4;
    char c = 'v';
    printf("%d \n %f \n %c \n", a, b, c);
}

Result

2
 0.400000
 v


Last Updated on

Next Post: GraphProtocol: TS2322 null assignment in Subgraph →

Comments