Semester : S1 and S2
Subject : Computer Programming
Year : 2018
Term : MARCH
Branch : BIOTECHNOLOGY
Scheme : 2015 Full Time
Course Code : CS 100
Page:17
printf ("enter ೩ number");
scanf("%d", &number); temp =
number; while (number != 0)
{ rem = number % 10; cube =
pow(rem, 3); sum = sum +
cube; number = number /
10;
}
if (sum == temp) printf ("The given no is
printf ("fe given no is not a armstrong no")
armstrong no"); else
Output:
enter a number370 The given no is
armstrong no
enter a number1500
The given no is not a armstrong no b)
The C Preprocessor is not a part of the compiler, but is a separate step in the compilation process. In
simple terms, a C Preprocessor is just a text substitution tool and it instructs the compiler to do required
pre-processing before the actual compilation.
All preprocessor commands begin with a hash symbol (#).
The following section lists down all the important preprocessor directives - 1 .#define-
Substitutes a preprocessor macro.
2 .4#include-Inserts a particular header from another file.
3 .#undef-Undefines a preprocessor macro.