Skip to main content

Posts

Featured

Simple C Programming examples - The Incredible Truth

Simple C-Programming Examples  with Output ⇒


1st Program: 
#include <stdio.h>    /*linking section*/ #include <conio.h> void main()/*program section*/ { int X=10; clrscr(); { int X=15; printf(“\n X: %d”, X); } printf(“\n Value of X: %d”, X); getch(); }
Output:
X: 15 Value of X: 10

2nd Program:

#include <stdio.h>/*linking section*/ #include <conio.h> void main()/*program section*/ { int X, Y, Z; clrscr(); printf(“\n Enter the value:”); scanf(“%2d%2d%4d”, &X, &Y, &Z); printf(“\n X:%d Y:%d Z:%d”, X,Y,Z); getch(); }
Output: (As per your requirement)
Enter the value: 12345678 X: 12 Y: 34 Z: 5678
Or if,
Enter the value: 1234567 X: 12 Y: 34 Z: 567
See Also:

Addition of two numbers with C-Programming

Introduction to C-Programming

Latest Posts

Addition of two numbers with C coding - The Incredible Truth

Introduction to C-programming - The Incredible Truth

Weiss's Theory of Ferromagnetism - The Incredible Truth

Quantum Definition of Time - The Incredible Truth

UNIQUE PROCESS OF SUMMATION BY GAUSS -TIT

What's the space made of ? - The Incredible Truth

Black Hole Paradox - The Incredible Truth

Drake Equation - The Incredible Truth

Schwarzschild Radius - The Incredible Truth

2-D Shadow concept - The Incredible Truth