Operator Examples PDF
Document Details
Uploaded by ImpartialRiemann
Shoolini University
Tags
Summary
This document shows examples of C programming code demonstrating the use of different operators like comma, arithmetic, logical, relational and bitwise operators. The code examples are designed to illustrate the use of these operators in C programming language.
Full Transcript
/*P4.7 Program to understand the use of comma operator* / \#include\ main( ) { int a , b , C , sum; sum =(a=8,b=7,c=9,a+b+c); printf("Sum %d",sum); } main ( ) { int a=-3; a= - a - a + ! a ; printf("%d",a); } main ( { int a=2,b=1,c,d; c=a\b)&&(c\ b \> a) printf("TRUE"); else printf("FALSE"); return...
/*P4.7 Program to understand the use of comma operator* / \#include\ main( ) { int a , b , C , sum; sum =(a=8,b=7,c=9,a+b+c); printf("Sum %d",sum); } main ( ) { int a=-3; a= - a - a + ! a ; printf("%d",a); } main ( { int a=2,b=1,c,d; c=a\b)&&(c\ b \> a) printf("TRUE"); else printf("FALSE"); return 0; } \#include \ int main() { printf("%d", 1 \