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

Padovan string, padovan string problem program 1 : package test.padovan...

padovan string problem program 1 : package test.padovanstring; public class PadovanString {     public int stringOccurrences(int n, String str){        if(n >= 40)

Cloud computing, hi Bhasker, as we spoke tru phone ,we need a project usin...

hi Bhasker, as we spoke tru phone ,we need a project using cloud computing .we need to present a protoype or demo on it (any thing using cloud should be fine)(ex: P2p)

Big M method, I Want a answer for solving the big M method in the topic of ...

I Want a answer for solving the big M method in the topic of simplex method...

Develop libcurl xml project, Develop libcurl XML project I have a Projec...

Develop libcurl XML project I have a Project using XML with C++. You will use things like LIbcurl etc....and a XML parser to finish the project. Developer must know how to use X

Identify and briefly explain the objects and methods , You are to develop a...

You are to develop a Clinic System. 1. Identify and briefly explain the objects, classes, methods and attributes for the Clinic System. 2. Draw a use case diagram to represen

Linear iterative process, (a) Write a recursive procedure (digits n) that c...

(a) Write a recursive procedure (digits n) that computes the number of digits in the integer n using a linear recursive process. For example, (digits 42) should return 2 and (digit

Define storage classes of c program - computer programming, Define Storage ...

Define Storage Classes of c program - computer programming? Each variable and function in C language has two attributes that are type and storage class. If storage class of a v

Example for register storage class - computer programming, Example for Regi...

Example for Register Storage Class - computer programming? main() { register int i; for (i=0; i { ............... ............... } } /* block exit will free the register

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