C-programming - Assignment operator, C++ assignment operator
Assignment operator
The assignment operator '=' is the operator used for assignment. Using the assignment operator, the value from the source (left side) is copied to the destination (right side).The following program illustrates the usage of assignment operator
#include <iostream.h> #include <conio.h> int main( ) { char ch='J'; int i, j, k; float a, b, c; (a=(b=(c=7.5))); i=j=k=3; cout << "ch:" << ch << '\n' ; cout << "i:" << i << "j:" << j << "k" << k '\n' ; cout << "a:" << a << "b:" << b << "c" << c '\n' ; return 0; }
output
ch=J i=3 j=3 k=3 a=7.5 b=7.5 c=7.5
The topic on C-programming - Assignment operator is posted by - Sathya
Hope you have enjoyed, C-programming - Assignment operatorThanks for your time