Code:
#include
main()
{
int x = 1;
if ( x == 1 )
printf("x is equal to one.\n");
else
printf("For comparison use == as = is the assignment operator.\n");
return 0;
}
Output:
x is equal to one.
More Imp Topics:
C hello world program
C program to take input from user using scanf
C program looping
C program for prime number
C program for command line arguments
Simple C array program
Simple C function program
C program using structures
C program for Fibonacci series
C graphics programming