Define the assignment operators in c language, C/C++ Programming

Assignment Help:

Define the Assignment Operators in c language?

The assignment operators can be used to assign a value to the variable and is represented by equal to (=) sign. The Assignment expression that make use of this operator are written in the form

Identifier = expression;

Where expression represents a constant and identifier represents a variable and a variable or an arithmetic expression.

C has some operators which offer abbreviation of certain types of arithmetic assignment statements. These operations are generally very efficient. They are able to combined with another expression.

x = a * b++; is equivalent to x = a*b; b = b+1;

Versions where the operator takes place before the variable name change the value of the variable before evaluating the expression, thus

x = --i * (a+b); is equivalent to i=i-1; x = i * (a+b);

These are able to cause confusion if you try to do too many things on one command line. You are recommended to limit your use of ++ and -- to ensure that your programs stay readable.

Another shorthand notation is listed below

Short hand         Equivalent

i += 10;              i=i+10;
i *= 10;              i=i*10;
i -= 10;              i=i-10;
i /= 10;              i=i/10;


Related Discussions:- Define the assignment operators in c language

Define bitwise-shift operators, Define Bitwise-Shift Operators? The shi...

Define Bitwise-Shift Operators? The shift operators perform suitable shift by operator on the right to the operator on the left. The right operator should be positive. The va

Explain the working of strcpy function, Explain the Working of strcpy Funct...

Explain the Working of strcpy Function? strcpy() : This function is meant to use to copy one string to another. The strcpy function as well accepts two strings as arguments.

Pseudo code, pseudo code that will determine if the number is prime or comp...

pseudo code that will determine if the number is prime or composite

Insertion sort - c program, Insertion sort - C program: Write a progra...

Insertion sort - C program: Write a program in c to define a insertion sort. void main()  {   clrscr();   int a[100],ch,n;   cout   cin>>n;   for (int i=0

Classes, write a grading program for a class with the following grading pol...

write a grading program for a class with the following grading polices: a.there are two quizzes eaxh graded on the basis of 10 points b.there is ome midterm exam and one final exam

Data structure, convert BST into sorted doubly linked list

convert BST into sorted doubly linked list

Least cost method, c program to implement least cost method

c program to implement least cost method

C program for string address, C Program for STRING ADDRESS #include std...

C Program for STRING ADDRESS #include stdio.h> #include conio.h> #include string.h> void main() {           char *name;           int length;           cha

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd