Use and : Operator General « Language Basics « C / ANSI-C






Use and

#include <stdio.h>

int main()
{
    int a, b;  /* two integers */

    a = 4;
    b = 2;

    if ((a != 0) && (b != 0))
      printf("Both are not zero\n");

    return (0);
}


           
       








Related examples in the same category

1.compute the area of a triangle, given its width and height
2.This program produces a Celsius to Fahrenheit conversion chart for the numbers 0 to 100
3.Output float: Result of the divide
4.Using the ;amp operator: get the addressUsing the ;amp operator: get the address
5.Calculations: plus
6.Calculations: plus and minusCalculations: plus and minus
7.Calculation: divide and mod, / %Calculation: divide and mod, / %
8.Division with float values and output it
9.Calculation: divide, product and PICalculation: divide, product and PI
10.Bitwise operatorBitwise operator
11.( ) operator
12.Plus operator
13.Operator for int value