IHYPRESS PROGRAMMING
Tutorials and C programs with code and output for beginners
c programming
HOME | ASP | C | CSS | GNUPLOT | HTML | JAVASCRIPT | PERL | PHP | PYTHON | RUBY | SVG
COverview of C : Assignment Operator
<01.07>
/* The = operator puts the value on the right */ /* into the variable on the left */
#include <stdio.h> int main (void) { /* declarations */ int a, b, c, d, e; /* fill variable a */ a = 10; /* modify variable a few times*/ a = 20; a = 10 + a; a = a + a + 2; a = 2 + a; /* a few more assignments */ b = a; c = b = 5; c = 10 + a; d = a + a + 2; e = 20 + a; a = a - b + c; /* the final values are... */ printf ("a:%4d\n b:%4d\n c:%4d\n d:%4d\n e:%4d\n", a, b, c, d, e); return (0); }
Hergestellt in Deutschland / Made in Germany
a: 133 b: 5 c: 74 d: 130 e: 84
COPYRIGHT © 2015-2024 IHY PRESS Frankfurt am Main 60329 Deutschland